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_ptr(ptr: *mut EDIT_SECTION) -> Self

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

§Safety

有効な 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 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>

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

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

対象エフェクトの数。存在しない場合は0を返します。

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_effect_item( &self, object: &ObjectHandle, effect_name: &str, effect_index: usize, item: &str, ) -> EditSectionResult<String>

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

§Arguments
  • object:対象のオブジェクトハンドル。
  • effect_name:設定項目の名前。
  • effect_index:同じ名前の設定項目が複数ある場合のインデックス(0始まり)。
  • item:設定項目の名前。(エイリアスファイルのキーの名前)
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 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 get_focused_object(&self) -> EditSectionResult<Option<ObjectHandle>>

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

Source

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

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

Source

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

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

§Note

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

Source

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

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

§Note

内部的には、get_object_layer_frame を呼び出してレイヤー番号が -1 でないかを確認しています。

Source

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

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

Source

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

EditSectionLayerCaller を作成します。

Source

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

EditSectionObjectCaller を作成します。

Trait Implementations§

Source§

impl Debug for EditSection

Source§

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

Formats the value using the given formatter. Read more

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.