Skip to main content

HostAppHandle

Struct HostAppHandle 

Source
pub struct HostAppHandle<'a> { /* private fields */ }
Available on crate feature generic only.
Expand description

ホストアプリケーションのハンドル。 プラグインの初期化処理で使用します。

§Panics

この型がプラグインの初期化処理の外で使用された場合はPanicします。

Implementations§

Source§

impl<'plugin> HostAppHandle<'plugin>

Source

pub fn create_edit_handle(&mut self) -> EditHandle

プロジェクトデータ編集用のハンドルを登録します。

Source

pub fn register_import_menu<F>(&mut self, name: &str, callback: F)
where F: Fn() + 'static + Send + Sync,

インポートメニューを登録します。

§See Also
Source

pub fn register_export_menu<F>(&mut self, name: &str, callback: F)
where F: Fn() + 'static + Send + Sync,

エクスポートメニューを登録します。

§See Also
Source

pub fn register_layer_menu<F>(&mut self, name: &str, callback: F)
where F: Fn() + 'static + Send + Sync,

レイヤーメニューを登録します。 レイヤー編集でオブジェクト未選択時の右クリックメニューに追加されます。 名前に\\を含めるとサブメニューとして登録されます。

§See Also
Source

pub fn register_object_menu<F>(&mut self, name: &str, callback: F)
where F: Fn() + 'static + Send + Sync,

オブジェクトメニューを登録します。 レイヤー編集でオブジェクト選択時の右クリックメニューに追加されます。 名前に\\を含めるとサブメニューとして登録されます。

§See Also
Source

pub fn register_edit_menu<F>(&mut self, name: &str, callback: F)
where F: Fn() + 'static + Send + Sync,

編集メニューを登録します。 名前に\\を含めるとサブメニューとして登録されます。

§See Also
Source

pub fn register_config_menu( &mut self, name: &str, callback: extern "C" fn(HWND, HINSTANCE), )

設定メニューを登録します。 設定メニューの登録後にウィンドウクライアントを登録するとシステムメニューに「設定」が追加されます。

§See Also
Source

pub fn register_object_item_menu<F>(&mut self, name: &str, callback: F)
where F: Fn(ObjectHandle, &str, usize, &str) + 'static + Send + Sync,

オブジェクト編集の設定項目メニューを登録します。 オブジェクト編集の右クリックメニューに追加されます。 名前に\\を含めるとサブメニューとして登録されます。 Self::register_object_item_and_effect_menuと違い、これはエフェクトそのものに対してはメニューが表示されず、設定項目に対してのみメニューが表示されるようになります。

§Arguments
  • name: メニューの名称。
  • callback: メニューが選択されたときのコールバック関数。
§Note

register_object_item_menuallow_effect_only = falseに相当します。

Source

pub fn register_object_item_and_effect_menu<F>( &mut self, name: &str, callback: F, )
where F: Fn(ObjectHandle, &str, usize, Option<&str>) + 'static + Send + Sync,

オブジェクト編集の設定項目メニューを登録します。 オブジェクト編集の右クリックメニューに追加されます。 名前に\\を含めるとサブメニューとして登録されます。 Self::register_object_item_menuと違い、これはエフェクトそのものに対してもメニューが表示されるようになります。

§Arguments
  • name: メニューの名称。
  • callback: メニューが選択されたときのコールバック関数。
§Note

register_object_item_menuallow_effect_only = trueに相当します。

Source

pub fn register_file_drop_handler<F>( &mut self, name: &str, file_filters: &[FileFilter], callback: F, )
where F: Fn(PathBuf) + 'static + Send + Sync,

ファイルをドロップしたときの処理を登録します。

§Arguments
  • name: ドラッグ時のツールチップや入力プラグインの設定で表示する名称。
  • file_filter: 対応するファイルフィルタ。
  • callback: ドロップされたファイルのパスを受け取るコールバック関数。
Source

pub fn register_window_client<T: HasWindowHandle>( &mut self, name: &str, instance: &T, ) -> Result<(), HandleError>

ウィンドウクライアントを登録します。

§Panics

Win32のウィンドウハンドル以外が渡された場合はPanicします。

Source

pub fn register_menus<T: GenericPluginMenus>(&mut self)

メニューを一括登録します。

§See Also
Source

pub fn register_project_load_handler( &mut self, callback: extern "C" fn(*mut PROJECT_FILE), )

プロジェクトファイルをロードした直後に呼ばれる関数を登録します。 また、プロジェクトの初期化時にも呼ばれます。

§Note

crate::generic::GenericPlugin::on_project_load が自動的に登録されるため、 通常はこの関数を直接使用する必要はありません。

Source

pub fn register_project_save_handler( &mut self, callback: extern "C" fn(*mut PROJECT_FILE), )

プロジェクトファイルを保存する直前に呼ばれる関数を登録します。

§Note

crate::generic::GenericPlugin::on_project_save が自動的に登録されるため、 通常はこの関数を直接使用する必要はありません。

Source

pub fn register_clear_cache_handler( &mut self, callback: extern "C" fn(*mut EDIT_SECTION), )

「キャッシュを破棄」が呼ばれたときに呼ばれる関数を登録します。

§Note

crate::generic::GenericPlugin::on_clear_cache が自動的に登録されるため、 通常はこの関数を直接使用する必要はありません。

Source

pub fn register_change_scene_handler( &mut self, callback: extern "C" fn(*mut EDIT_SECTION), )

シーンを変更した直後に呼ばれる関数を登録します。

§Note

crate::generic::GenericPlugin::on_change_scene が自動的に登録されるため、 通常はこの関数を直接使用する必要はありません。

Source§

impl<'a> HostAppHandle<'a>

Source

pub fn register_input_plugin<T: InputPlugin + InputSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature input only.

入力プラグインを登録します。

Source

pub fn register_input_plugin_nounwind<T: InputPlugin + InputSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature input only.

unwindなしで入力プラグインを登録します。

Source§

impl<'a> HostAppHandle<'a>

Source

pub fn register_output_plugin<T: OutputPlugin + OutputSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature output only.

出力プラグインを登録します。

Source

pub fn register_output_plugin_nounwind<T: OutputPlugin + OutputSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature output only.

unwindなしで出力プラグインを登録します。

Source§

impl<'a> HostAppHandle<'a>

Source

pub fn register_filter_plugin<T: FilterPlugin + FilterSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature filter only.

フィルタープラグインを登録します。

Source

pub fn register_filter_plugin_nounwind<T: FilterPlugin + FilterSingleton + 'static>( &mut self, handle: &SubPlugin<T>, )

Available on crate feature filter only.

unwindなしでフィルタープラグインを登録します。

Source§

impl<'a> HostAppHandle<'a>

Source

pub fn register_script_module<T: ScriptModule + ScriptModuleSingleton + 'static>( &mut self, name: Option<&str>, handle: &SubPlugin<T>, )

Available on crate feature module only.

スクリプトモジュールを登録します。

§Arguments
  • name: モジュール名。
Source

pub fn register_script_module_nounwind<T: ScriptModule + ScriptModuleSingleton + 'static>( &mut self, name: Option<&str>, handle: &SubPlugin<T>, )

Available on crate feature module only.

unwindなしでスクリプトモジュールを登録します。

§Arguments
  • name: モジュール名。

Auto Trait Implementations§

§

impl<'a> Freeze for HostAppHandle<'a>

§

impl<'a> RefUnwindSafe for HostAppHandle<'a>

§

impl<'a> !Send for HostAppHandle<'a>

§

impl<'a> !Sync for HostAppHandle<'a>

§

impl<'a> Unpin for HostAppHandle<'a>

§

impl<'a> UnsafeUnpin for HostAppHandle<'a>

§

impl<'a> !UnwindSafe for HostAppHandle<'a>

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.

§

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

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