Skip to main content

EditSection

Struct EditSection 

Source
pub struct EditSection {
    pub info: EditInfo,
    /* private fields */
}
Available on crate feature generic only.
Expand description

編集セクションのハンドル。

Fields§

§info: EditInfo

編集情報。

Implementations§

Source§

impl EditSection

Source

pub unsafe fn from_raw(ptr: *mut EDIT_SECTION) -> Self

生ポインタから EditSection を作成する。

§Safety

call_edit_section から取得した、有効な EDIT_SECTION ポインタである必要があります。

Source

pub fn create_object_from_alias( &self, alias: &str, layer: usize, frame: usize, length: usize, ) -> EditSectionResult<ObjectHandle>

オブジェクトエイリアスから指定の位置にオブジェクトを作成する。

§Arguments
  • alias:オブジェクトエイリアスのデータ。オブジェクトエイリアスと同じフォーマットで指定します。
  • layer:作成するオブジェクトのレイヤー番号(0始まり)。
  • frame:作成するオブジェクトのフレーム番号(0始まり)。
  • length:作成するオブジェクトの長さ(フレーム数)。

lengthはエイリアスデータにフレーム情報が無い場合に利用されます。

§Errors

エイリアスの変換に失敗した場合、またはオブジェクトが既存のオブジェクトに重なる場合にエラー

Source

pub fn set_object_name( &self, object: ObjectHandle, name: Option<&str>, ) -> EditSectionResult<()>

オブジェクト名を設定する。

§Note

nameNoneや空文字を指定すると、標準の名前になります。

Source

pub fn set_object_effect_item( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, value: &str, ) -> EditSectionResult<()>

オブジェクトの設定項目の値を文字列で設定する。

§Arguments
  • object:対象のオブジェクトハンドル。
  • effect_name:設定項目の名前。
  • effect_index:同じ名前の設定項目が複数ある場合のインデックス(0始まり)。
  • item:設定項目の名前。(エイリアスファイルのキーの名前)
  • value:設定する値。
Source

pub fn set_effect_data_value( &self, effect: EffectHandle, item: &str, data: &[u8], ) -> EditSectionResult<()>

エフェクトの汎用データ項目の値をバイト列で設定する。

Source

pub fn set_effect_data_value_with<T>( &self, effect: EffectHandle, item: &str, data: &T, ) -> EditSectionResult<()>

エフェクトの汎用データ項目の値を指定の型で設定する。

Source

pub fn move_object( &self, object: ObjectHandle, new_layer: usize, new_start_frame: usize, ) -> EditSectionResult<()>

オブジェクトを移動する。

Source

pub fn delete_object(&self, object: ObjectHandle) -> EditSectionResult<()>

オブジェクトを削除する。

Source

pub fn set_focus_object( &self, object: Option<ObjectHandle>, ) -> EditSectionResult<()>

オブジェクト設定ウィンドウで指定のオブジェクトを選択状態にする。

§Note

コールバック処理の終了時に設定されます。

Source

pub fn get_project_file<'handle>( &'handle self, edit_handle: &EditHandle, ) -> ProjectFile<'handle>

プロジェクトファイルのポインタを取得する。

Source

pub fn get_mouse_layer_frame(&self) -> EditSectionResult<Option<LayerFrameData>>

マウス座標のレイヤー・フレーム位置を取得する。

§Returns

マウスがレイヤー編集エリア内にある場合は Some を返し、 そうでない場合は None を返します。

Source

pub fn pos_to_layer_frame( &self, x: i32, y: i32, ) -> EditSectionResult<Option<LayerFrameData>>

指定のスクリーン座標のレイヤー・フレーム位置を取得する。

Source

pub fn create_object_from_media_file<P: AsRef<Path>>( &self, file_path: P, layer: usize, frame: usize, length: Option<usize>, ) -> EditSectionResult<ObjectHandle>

指定の位置にメディアファイルからオブジェクトを作成する。

§Arguments
  • file_path:メディアファイルのパス。
  • layer:作成するオブジェクトのレイヤー番号(0始まり)。
  • frame:作成するオブジェクトのフレーム番号(0始まり)。
  • length:作成するオブジェクトの長さ(フレーム数)。Noneを指定した場合、長さや追加位置は自動的に調整されます。
Source

pub fn create_object( &self, effect: &str, layer: usize, frame: usize, length: Option<usize>, ) -> EditSectionResult<ObjectHandle>

指定の位置にオブジェクトを作成する。

§Arguments
  • effect:エフェクト名。(エイリアスファイルの effect.name の値)
  • layer:作成するオブジェクトのレイヤー番号(0始まり)。
  • frame:作成するオブジェクトのフレーム番号(0始まり)。
  • length:作成するオブジェクトの長さ(フレーム数)。Noneを指定した場合、長さや追加位置は自動的に調整されます。
Source

pub fn create_effect( &self, object: ObjectHandle, effect: &str, ) -> EditSectionResult<EffectHandle>

オブジェクトにエフェクトを追加する。

§Note

エフェクトが入出力エフェクトの場合は、効果が追加される代わりに、オブジェクトのエフェクトが置き換えられます。

§Arguments
  • object:対象のオブジェクトハンドル。
  • effect:追加するエフェクト名。(エイリアスファイルの effect.name の値)
Source

pub fn delete_effect( &self, object: ObjectHandle, effect: EffectHandle, ) -> EditSectionResult<()>

オブジェクトからエフェクトを削除する。

Source

pub fn create_object_section( &self, object: ObjectHandle, frame: usize, ) -> EditSectionResult<()>

オブジェクトに中間点(区間)を追加する。

Source

pub fn delete_object_section( &self, object: ObjectHandle, section: usize, ) -> EditSectionResult<()>

オブジェクトの中間点(区間)を削除する。

Source

pub fn move_object_section( &self, object: ObjectHandle, section: usize, new_frame: usize, ) -> EditSectionResult<()>

オブジェクトの中間点(区間)を移動する。

§Note
  • sectionに0を指定すると開始地点を、区間数(最終区間+1)を指定すると終了地点を移動します。
  • 区間をまたいだ移動は出来ません。
Source

pub fn move_effect( &self, object: ObjectHandle, effect: EffectHandle, index: usize, ) -> EditSectionResult<usize>

オブジェクトのエフェクトの順序を移動する。

§Returns

移動処理後のエフェクトの順序を返します。

Source

pub fn set_cursor_layer_frame( &self, layer: usize, frame: usize, ) -> EditSectionResult<()>

現在のレイヤー・フレーム位置を設定する。

§Note

設定出来る範囲に調整されます。

Source

pub fn set_display_layer_frame( &self, layer: usize, frame: usize, ) -> EditSectionResult<()>

レイヤー編集のレイヤー・フレームの表示開始位置を設定する。

§Note

設定出来る範囲に調整されます。

Source

pub fn set_select_range( &self, start: usize, end: usize, ) -> EditSectionResult<()>

フレーム範囲選択を設定する。

§Note

設定出来る範囲に調整されます。

Source

pub fn clear_select_range(&self) -> EditSectionResult<()>

選択されているフレーム範囲選択を解除する。

Source

pub fn set_grid_bpm_list(&self, bpm_info: &[BpmInfo]) -> EditSectionResult<()>

BPMグリッドのBPM情報の一覧を設定する。

Source

pub fn set_layer_name( &self, layer: usize, name: Option<&str>, ) -> EditSectionResult<()>

レイヤーの名前を設定する。 nameNoneや空文字を指定すると、標準の名前になります。

Source

pub fn set_scene_name(&self, name: &str) -> EditSectionResult<()>

シーン名を設定する。

シーンの操作は現状Undoに対応していません。
Source

pub fn set_scene_size( &self, width: usize, height: usize, ) -> EditSectionResult<()>

シーンの解像度を設定する。

シーンの操作は現状Undoに対応していません。
Source

pub fn set_scene_fps(&self, fps: Rational32) -> EditSectionResult<()>

シーンのフレームレートを設定する。

シーンの操作は現状Undoに対応していません。
Source

pub fn set_scene_sample_rate(&self, sample_rate: usize) -> EditSectionResult<()>

シーンのサンプルレートを設定する。

シーンの操作は現状Undoに対応していません。
Source

pub fn set_layer_enable( &self, layer: usize, enable: bool, ) -> EditSectionResult<()>

レイヤーの表示・非表示を設定する。

Source

pub fn set_layer_lock(&self, layer: usize, lock: bool) -> EditSectionResult<()>

レイヤーのロック状態を設定する。

Source

pub fn set_effect_enable( &self, effect: EffectHandle, enable: bool, ) -> EditSectionResult<()>

エフェクトの有効・無効状態を設定する。

Source

pub fn set_effect_lock( &self, effect: EffectHandle, lock: bool, ) -> EditSectionResult<()>

エフェクトのロック状態を設定する。

Source

pub fn set_effect_item_value( &self, effect: EffectHandle, item: &str, value: &str, ) -> EditSectionResult<()>

エフェクトの設定項目の値を文字列で設定する。

Source

pub fn set_mark_frame(&self, frame: usize, memo: &str) -> EditSectionResult<()>

指定フレームをマークする。

Source

pub fn clear_mark_frame(&self, frame: usize) -> EditSectionResult<()>

指定フレームのマークを解除する。

Source

pub fn move_mark_frame( &self, old_frame: usize, new_frame: usize, ) -> EditSectionResult<()>

指定フレームのマークを移動する。

Source

pub fn set_palette_info( &self, name: &str, palette: &PaletteInfo, ) -> EditSectionResult<()>

指定のパレット情報を設定する。

Source

pub fn set_edited_state(&self) -> EditSectionResult<()>

編集データを編集済み状態に設定する。

§Note

通常は自動的に設定されます。

Source

pub fn layers(&self) -> EditSectionLayersIterator<'_>

すべてのレイヤーをイテレータで取得する。

Source

pub fn objects_in_layer( &self, layer: usize, ) -> EditSectionLayerObjectsIterator<'_, EditSection>

特定のレイヤー内のオブジェクトをイテレータで取得する。

Source

pub fn layer<'a>( &'a self, layer: usize, ) -> EditSectionLayerCaller<'a, EditSection>

EditSectionLayerCaller を作成する。

Source

pub fn object<'a>( &'a self, object: ObjectHandle, ) -> EditSectionObjectCaller<'a, EditSection>

EditSectionObjectCaller を作成する。

Source

pub fn effect<'a>( &'a self, effect: EffectHandle, ) -> EditSectionEffectCaller<'a, EditSection>

EditSectionEffectCaller を作成する。

Methods from Deref<Target = ReadSection>§

Source

pub fn find_object_after( &self, layer: usize, frame: usize, ) -> EditSectionResult<Option<ObjectHandle>>

指定のフレーム番号以降にあるオブジェクトを検索する。

§Arguments
  • layer:検索するレイヤー番号(0始まり)。
  • frame:検索を開始するフレーム番号(0始まり)。
Source

pub fn count_object_effect( &self, object: ObjectHandle, effect: &str, ) -> EditSectionResult<usize>

オブジェクトに対象エフェクトが何個存在するかを取得する。

Source

pub fn get_object_layer_frame( &self, object: ObjectHandle, ) -> EditSectionResult<ObjectLayerFrame>

指定のオブジェクトのレイヤーとフレーム情報を取得する。

Source

pub fn get_object_alias( &self, object: ObjectHandle, ) -> EditSectionResult<String>

オブジェクトの情報をエイリアスデータとして取得する。

Source

pub fn get_object_alias_parsed( &self, object: ObjectHandle, ) -> Result<Table, EditSectionParsedError<TableParseError>>

Available on crate feature aviutl2-alias only.

オブジェクトの情報をエイリアスデータとして取得し、パースする。

Source

pub fn get_object_name( &self, object: ObjectHandle, ) -> EditSectionResult<Option<String>>

オブジェクト名を取得する。

Source

pub fn get_object_effect_item( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, ) -> EditSectionResult<String>

オブジェクトの設定項目の値を文字列で取得する。

Source

pub fn get_object_effect_item_parsed<T: FromTableValue>( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, ) -> Result<T, EditSectionParsedError<<T as FromTableValue>::Err>>
where <T as FromTableValue>::Err: Error + Sync + Send + 'static,

Available on crate feature aviutl2-alias only.

オブジェクトの設定項目の値を取得し、パースする。

Source

pub fn get_focused_object(&self) -> EditSectionResult<Option<ObjectHandle>>

現在、オブジェクト設定ウィンドウで選択されているオブジェクトを取得する。

Source

pub fn get_selected_objects(&self) -> EditSectionResult<Vec<ObjectHandle>>

現在選択されているオブジェクトの一覧を取得する。

Source

pub fn is_support_media_file<P: AsRef<Path>>( &self, file_path: P, mode: MediaFileSupportMode, ) -> EditSectionResult<bool>

指定のメディアファイルがサポートされているかどうか調べる。

Source

pub fn get_media_info<P: AsRef<Path>>( &self, file_path: P, ) -> EditSectionResult<MediaInfo>

指定のメディアファイルの情報を取得する。

Source

pub fn get_layer_name(&self, layer: usize) -> EditSectionResult<Option<String>>

レイヤーの名前を取得する。

Source

pub fn get_scene_name(&self) -> EditSectionResult<String>

シーン名を取得する。

Source

pub fn get_layer_enable(&self, layer: usize) -> EditSectionResult<bool>

レイヤーの表示・非表示を取得する。

Source

pub fn get_layer_lock(&self, layer: usize) -> EditSectionResult<bool>

レイヤーのロック状態を取得する。

Source

pub fn get_object_section_num( &self, object: ObjectHandle, ) -> EditSectionResult<usize>

オブジェクトの区間の数を取得する。

Source

pub fn get_object_section_frame( &self, object: ObjectHandle, section: usize, ) -> EditSectionResult<usize>

オブジェクトの区間の開始フレーム番号を取得する。

Source

pub fn get_object_section_frames( &self, object: ObjectHandle, ) -> EditSectionResult<Vec<usize>>

オブジェクトの区間のフレーム番号の一覧を取得する。

§Note

終端のフレーム番号は含まれません。 終端のフレーム番号を含めたい場合は、Self::get_object_section_rangesを使用してください。

Source

pub fn get_object_section_ranges( &self, object: ObjectHandle, ) -> EditSectionResult<Vec<Range<usize>>>

オブジェクトの区間のフレーム番号の範囲を取得する。

Source

pub fn get_object_track_value( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, frame: f64, ) -> EditSectionResult<f64>

指定フレーム位置でのオブジェクトのトラックバー項目の値を取得する。

Source

pub fn get_object_check_value( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, frame: usize, ) -> EditSectionResult<bool>

指定フレーム位置でのオブジェクトのチェックボックス項目の値を取得する。

Source

pub fn get_object_track_info( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, item: &str, ) -> EditSectionResult<TrackInfo>

オブジェクトのトラックバー項目の情報を取得する。 トラックバーではない項目の場合はエラーになります。

Source

pub fn get_palette_name(&self) -> EditSectionResult<String>

現在のパレット名を取得する。

Source

pub fn get_palette_info(&self, name: &str) -> EditSectionResult<PaletteInfo>

指定のパレット情報を取得する。

Source

pub fn get_current_palette_info(&self) -> EditSectionResult<PaletteInfo>

現在のパレット情報を取得する。

Source

pub fn get_font(&self, font_name: &str) -> EditSectionResult<*mut c_void>

登録されているフォントのDirectWriteのフォントのポインタを取得する。

Source

pub fn get_object_track_group_names( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, group_name: &str, ) -> EditSectionResult<Vec<String>>

オブジェクトのトラックバーグループの所属アイテム名を取得する。

Source

pub fn get_focus_object_section(&self) -> EditSectionResult<Option<usize>>

選択中オブジェクトの区間の位置を取得する。

Source

pub fn get_grid_bpm_list(&self) -> EditSectionResult<Vec<BpmInfo>>

BPMグリッドのBPM情報の一覧を取得する。

Source

pub fn find_effect( &self, object: ObjectHandle, effect_name: &str, effect_index: usize, ) -> EditSectionResult<EffectHandle>

オブジェクトからエフェクトを検索する。

Source

pub fn get_first_effect( &self, object: ObjectHandle, ) -> EditSectionResult<EffectHandle>

オブジェクトの先頭のエフェクトを取得する。

Source

pub fn get_effects( &self, object: ObjectHandle, ) -> EditSectionResult<Vec<EffectHandle>>

オブジェクトのエフェクト一覧を取得する。

Source

pub fn get_effect_enable(&self, effect: EffectHandle) -> EditSectionResult<bool>

エフェクトの有効・無効状態を取得する。

Source

pub fn get_effect_lock(&self, effect: EffectHandle) -> EditSectionResult<bool>

エフェクトのロック状態を取得する。

Source

pub fn get_effect_item_value( &self, effect: EffectHandle, item: &str, ) -> EditSectionResult<String>

エフェクトの設定項目の値を文字列で取得する。

Source

pub fn get_effect_item_value_parsed<T: FromTableValue>( &self, effect: EffectHandle, item: &str, ) -> Result<T, EditSectionParsedError<<T as FromTableValue>::Err>>
where <T as FromTableValue>::Err: Error + Sync + Send + 'static,

Available on crate feature aviutl2-alias only.

エフェクトの設定項目の値を取得し、パースする。

Source

pub fn get_effect_data_size( &self, effect: EffectHandle, item: &str, ) -> EditSectionResult<usize>

エフェクトの汎用データ項目のサイズを取得する。

Source

pub fn get_effect_data_value( &self, effect: EffectHandle, item: &str, ) -> EditSectionResult<Vec<u8>>

エフェクトの汎用データ項目の値をVec<u8>で取得する。

Source

pub unsafe fn get_effect_data_value_as<T>( &self, effect: EffectHandle, item: &str, ) -> EditSectionResult<T>

エフェクトの汎用データ項目の値を指定の型で取得する。

§Errors

T のサイズがエフェクトのデータ項目のサイズと一致しない場合、EditSectionError::ApiCallFailed を返します。

§Safety

Trepr(C) であり、かつエフェクトのデータ項目のサイズと一致している必要があります。

Source

pub fn get_effect_track_value( &self, effect: EffectHandle, item: &str, frame: f64, ) -> EditSectionResult<f64>

エフェクトの指定フレーム位置でのトラックバー項目の値を取得する。

Source

pub fn get_effect_check_value( &self, effect: EffectHandle, item: &str, frame: usize, ) -> EditSectionResult<bool>

エフェクトの指定フレーム位置でのチェックボックス項目の値を取得する。

Source

pub fn get_effect_track_info( &self, effect: EffectHandle, item: &str, ) -> EditSectionResult<TrackInfo>

エフェクトのトラックバー項目の情報を取得する。

Source

pub fn get_effect_name(&self, effect: EffectHandle) -> EditSectionResult<String>

エフェクト名を取得する。

Source

pub fn get_mark_frame_list(&self) -> EditSectionResult<Vec<usize>>

マークされているフレームの一覧を取得する。

Source

pub fn get_mark_frame_memo(&self, frame: usize) -> EditSectionResult<String>

指定フレームのマークのメモを取得する。

Source

pub fn object_exists(&self, object: ObjectHandle) -> bool

オブジェクトが存在するかどうか調べる。

Source

pub fn effect_exists(&self, effect: EffectHandle) -> bool

エフェクトが存在するかどうか調べる。

Source

pub fn objects_in_layer( &self, layer: usize, ) -> EditSectionLayerObjectsIterator<'_, ReadSection>

特定のレイヤー内のオブジェクトをイテレータで取得する。

Source

pub fn layer<'a>( &'a self, layer: usize, ) -> EditSectionLayerCaller<'a, ReadSection>

EditSectionLayerCaller を作成する。

Source

pub fn object<'a>( &'a self, object: ObjectHandle, ) -> EditSectionObjectCaller<'a, ReadSection>

EditSectionObjectCaller を作成する。

Source

pub fn effect<'a>( &'a self, effect: EffectHandle, ) -> EditSectionEffectCaller<'a, ReadSection>

EditSectionEffectCaller を作成する。

Trait Implementations§

Source§

impl Debug for EditSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for EditSection

Source§

type Target = ReadSection

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl ReadSectionProvider for EditSection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more