檢視原始碼 wxFontData (wx v2.4.3)

這個類別包含與字型對話框相關的各種資訊。

請參閱

wxWidgets 文件:wxFontData

摘要

函式

銷毀物件

在 Windows 或通用平台下啟用或停用「效果」。

在 Windows 下,傳回一個標誌,決定是否可以選擇符號字型。

如果使用者按下「確定」(wxFontDialog::ShowModal()(在 wx 中未實現)傳回 wxID_OK),則取得使用者選擇的字型。

取得與字型對話框相關聯的顏色。

決定在 Windows 下是否啟用「效果」。

取得字型對話框最初將使用的字型。

如果將顯示「說明」按鈕(僅限 Windows),則傳回 true。

建構子。

複製建構子。

在 Windows 下,決定是否可以選擇符號字型。

設定將返回給使用者的字型(僅供內部使用)。

設定將用於字型前景色的顏色。

設定字型對話框最初將使用的字型。

設定字型點大小的有效範圍(僅限 Windows)。

決定是否在字型對話框中顯示「說明」按鈕(僅限 Windows)。

類型

-type wxFontData() :: wx:wx_object().

函式

-spec destroy(This :: wxFontData()) -> ok.

銷毀物件

此函式的連結

enableEffects(This, Enable)

檢視原始碼
-spec enableEffects(This, Enable) -> ok when This :: wxFontData(), Enable :: boolean().

在 Windows 或通用平台下啟用或停用「效果」。

這指的是控制項,用於操作顏色、刪除線和底線屬性。

預設值為 true。

-spec getAllowSymbols(This) -> boolean() when This :: wxFontData().

在 Windows 下,傳回一個標誌,決定是否可以選擇符號字型。

在其他平台上沒有效果。

預設值為 true。

-spec getChosenFont(This) -> wxFont:wxFont() when This :: wxFontData().

如果使用者按下「確定」(wxFontDialog::ShowModal()(在 wx 中未實現)傳回 wxID_OK),則取得使用者選擇的字型。

-spec getColour(This) -> wx:wx_colour4() when This :: wxFontData().

取得與字型對話框相關聯的顏色。

預設值為黑色。

此函式的連結

getEnableEffects(This)

檢視原始碼
-spec getEnableEffects(This) -> boolean() when This :: wxFontData().

決定在 Windows 下是否啟用「效果」。

這指的是控制項,用於操作顏色、刪除線和底線屬性。

預設值為 true。

-spec getInitialFont(This) -> wxFont:wxFont() when This :: wxFontData().

取得字型對話框最初將使用的字型。

這應該先前已由應用程式設定。

-spec getShowHelp(This) -> boolean() when This :: wxFontData().

如果將顯示「說明」按鈕(僅限 Windows),則傳回 true。

預設值為 false。

-spec new() -> wxFontData().

建構子。

fontColour 初始化為黑色,showHelp 初始化為 false,allowSymbols 初始化為 true,enableEffects 初始化為 true,minSize 初始化為 0,maxSize 初始化為 0。

-spec new(Data) -> wxFontData() when Data :: wxFontData().

複製建構子。

此函式的連結

setAllowSymbols(This, AllowSymbols)

檢視原始碼
-spec setAllowSymbols(This, AllowSymbols) -> ok when This :: wxFontData(), AllowSymbols :: boolean().

在 Windows 下,決定是否可以選擇符號字型。

在其他平台上沒有效果。

預設值為 true。

此函式的連結

setChosenFont(This, Font)

檢視原始碼
-spec setChosenFont(This, Font) -> ok when This :: wxFontData(), Font :: wxFont:wxFont().

設定將返回給使用者的字型(僅供內部使用)。

此函式的連結

setColour(This, Colour)

檢視原始碼
-spec setColour(This, Colour) -> ok when This :: wxFontData(), Colour :: wx:wx_colour().

設定將用於字型前景色的顏色。

預設顏色為黑色。

此函式的連結

setInitialFont(This, Font)

檢視原始碼
-spec setInitialFont(This, Font) -> ok when This :: wxFontData(), Font :: wxFont:wxFont().

設定字型對話框最初將使用的字型。

此函式的連結

setRange(This, Min, Max)

檢視原始碼
-spec setRange(This, Min, Max) -> ok when This :: wxFontData(), Min :: integer(), Max :: integer().

設定字型點大小的有效範圍(僅限 Windows)。

預設為 0, 0 (無限制範圍)。

此函式的連結

setShowHelp(This, ShowHelp)

檢視原始碼
-spec setShowHelp(This, ShowHelp) -> ok when This :: wxFontData(), ShowHelp :: boolean().

決定是否在字型對話框中顯示「說明」按鈕(僅限 Windows)。

預設值為 false。