Skip to main content

ICorelScriptTools

Struct ICorelScriptTools 

Source
pub struct ICorelScriptTools { /* private fields */ }
Expand description

CorelDRAW 对象的后期绑定包装(脚本工具)。

所有属性与方法通过 IDispatch::Invoke 按名称调用,调用失败时一般返回 None 或 false。

Implementations§

Source§

impl ICorelScriptTools

Source

pub fn new(disp: IDispatch) -> Self

由 COM IDispatch 构造包装对象。

Source

pub fn from_disp(disp: IDispatch) -> Self

从 COM IDispatch 构造包装对象,等价于 new。

Source

pub fn length_convert(&self, from: i32, to: i32, value: f64) -> Option<f64>

长度转换(COM 方法 LengthConvert)。

Source

pub fn angle_convert(&self, from: i32, to: i32, value: f64) -> Option<f64>

角度转换(COM 方法 AngleConvert)。

Source

pub fn asin(&self, value: f64) -> Option<f64>

调用 COM 方法 ASin。

Source

pub fn log(&self, value: f64) -> Option<f64>

调用 COM 方法 Log。

Source

pub fn build_date(&self, year: i32, month: i32, day: i32) -> Option<f64>

调用 CorelDRAW COM 接口。

Source

pub fn format_time( &self, time: f64, format: impl Into<String>, ) -> Option<String>

调用 CorelDRAW COM 接口。

Source

pub fn file_attr(&self, folder_file: impl Into<String>) -> Option<i64>

调用 COM 方法 FileAttr。

Source

pub fn get_temp_folder(&self) -> Option<String>

读取 COM 属性 GetTempFolder。

Source

pub fn get_curr_folder(&self) -> Option<String>

读取 COM 属性 GetCurrFolder。

Source

pub fn get_script_folder(&self) -> Option<String>

读取脚本文件夹(GetScriptFolder)。

Source

pub fn mk_folder(&self, folder: impl Into<String>) -> Option<bool>

调用 COM 方法 MkFolder。

Source

pub fn rm_folder(&self, folder: impl Into<String>) -> Option<bool>

调用 COM 方法 RmFolder。

Source

pub fn kill(&self, file_name: impl Into<String>) -> Option<bool>

调用 COM 方法 Kill。

Source

pub fn rename( &self, src: impl Into<String>, dst: impl Into<String>, overwrite: i32, ) -> Option<bool>

调用 COM 方法 Rename。

Source

pub fn get_file_box( &self, filter: impl Into<String>, title: impl Into<String>, dialog_type: i32, file: impl Into<String>, extension: impl Into<String>, folder: impl Into<String>, button: impl Into<String>, ) -> Option<String>

读取文件框(GetFileBox)。

Source

pub fn get_folder( &self, init_folder: impl Into<String>, title: impl Into<String>, parent_window_handle: i32, ) -> Option<String>

读取文件夹(GetFolder)。

Source

pub fn get_app_handle(&self) -> Option<i64>

读取应用手柄(GetAppHandle)。

Source

pub fn get_win_handle(&self) -> Option<i64>

读取 COM 属性 GetWinHandle。

Source

pub fn get_command_line(&self) -> Option<String>

读取命令线(GetCommandLine)。

Source

pub fn get_version(&self, option: i32) -> Option<i64>

读取版本(GetVersion)。

Source

pub fn begin_wait_cursor(&self) -> bool

开始 wait 光标(COM 方法 BeginWaitCursor)。

Source

pub fn end_wait_cursor(&self) -> bool

结束 wait 光标(COM 方法 EndWaitCursor)。

Source

pub fn dec(&self, hex: impl Into<String>) -> Option<i64>

调用 COM 方法 Dec。

Source

pub fn from_centimeters(&self, v: f64) -> Option<f64>

调用 CorelDRAW COM 接口。

Source

pub fn to_centimeters(&self, v: f64) -> Option<f64>

调用 CorelDRAW COM 接口。

Source

pub fn from_inches(&self, v: f64) -> Option<f64>

调用 CorelDRAW COM 接口。

Source

pub fn to_inches(&self, v: f64) -> Option<f64>

调用 CorelDRAW COM 接口。

Source

pub fn from_points(&self, v: f64) -> Option<f64>

从…构造点集。

Source

pub fn to_points(&self, v: f64) -> Option<f64>

转换为点集。

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