MQWidget.WidgetBase class

全てのウィジェットの基底となるクラス。

Property

get set Type Name Description
o x int id ウィジェットID
o o string name ウィジェット名 (上書き不可)
o o int tag 任意値
o o bool enabled 有効状態
o o bool visible 可視状態
o o string horzLayout 横方向のレイアウト
[auto] 自動設定
[fixed] ピクセル単位で幅を指定
[hintsize] ヒントサイズ単位で幅を指定
[fill] 幅全体を埋める
[free] 位置・サイズを手動指定
o o string vertLayout 縦方向のレイアウト
[auto] 自動設定
[fixed] ピクセル単位で幅を指定
[hintsize] ヒントサイズ単位で幅を指定
[fill] 幅全体を埋める
[free] 位置・サイズを手動指定
o o bool width 横幅
o o bool height 縦幅
o o float fillRateX 横方向のフィル比率
o o float fillRateY 縦方向のフィル比率
o o float fillBeforeRate 前方の余白フィル比率
o o float fillAfterRate 後方の余白フィル比率
o o float inSpace 子ウィジェット間の隙間
o o float outSpace 子ウィジェット外側の隙間
o o float hintSizeRateX 横幅のヒントサイズ
o o float hintSizeRateY 縦幅のヒントサイズ
o o int cellColumn 行列フレームのセルの連結数
o o string hintText ツールチップに表示するヒント文字列

Method

Member Description
addChild 子ウィジェットを追加します。
insertChild 子ウィジェットを指定したインデックスに挿入します。
removeChild 子ウィジェットを除外します。
indexOfChild 子ウィジェットのインデックスを取得します。
getJustSize 子ウィジェットをちょうど収めるためのサイズを取得します。
repaint ウィジェットを再描画します。
clientToScreen クライアント座標をスクリーン座標に変換します。
screenToClient スクリーン座標をクライアント座標に変換します。
clientToClient クライアント座標を別のウィジェットのクライアント座標に変換します。

addChild(child)

子ウィジェットを追加します。

引数:
MQWidget.WidgetBase child - 子ウィジェット
戻り値:
int - 子ウィジェットのインデックス

insertChild(child, index)

子ウィジェットを指定したインデックスに挿入します。

引数:
MQWidget.WidgetBase child - 子ウィジェット
int index - インデックス
戻り値:
int - 子ウィジェットのインデックス

removeChild(child)

子ウィジェットを除外します。

引数:
MQWidget.WidgetBase child - 子ウィジェット

indexOfChild(child)

子ウィジェットのインデックスを取得します。

引数:
MQWidget.WidgetBase child - 子ウィジェット
戻り値:
int - 子ウィジェットのインデックス
[-1] 子ウィジェットでない

getJustSize([max_width, max_height])

子ウィジェットをちょうど収めるためのサイズを取得します。

引数:
int max_width - ウィジェットの最大横幅
int max_height - ウィジェットの最大縦幅
戻り値:
list{int,int} - 横幅・縦幅を格納したリスト

repaint([immediate])

ウィジェットを再描画します。

引数:
bool immediate - 直ちに描画を行うか

clientToScreen(x, y)

クライアント座標をスクリーン座標に変換します。

引数:
int x - クライアントのX座標
int y - クライアントのY座標
戻り値:
list{int,int,bool} - スクリーンX座標・Y座標・変換可否を格納したリスト

screenToClient(x, y)

スクリーン座標をクライアント座標に変換します。

引数:
int x - スクリーンのX座標
int y - スクリーンのY座標
戻り値:
list{int,int,bool} - クライアントX座標・Y座標・変換可否を格納したリスト

clientToClient(x, y, target)

クライアント座標を別のウィジェットのクライアント座標に変換します。

引数:
int x - クライアントのX座標
int y - クライアントのY座標
MQWidget.WidgetBase target - 変換先のウィジェット
戻り値:
list{int,int,bool} - 対象ウィジェットのX座標・Y座標・変換可否を格納したリスト