◆
~BitmapButtonCustomGui()
成员函数文档编制
◆
SetImage()
[1/4]
Sets the image from a
BaseBitmap
.
-
参数
-
[in]
|
bmp
|
The bitmap image.
|
[in]
|
copybmp
|
若
true
the bitmap is copied. If
false
, the bitmap pointer is only assigned but caller is still the ownership of it, so it must make sure the bitmap is available during all the
BitmapButtonCustomGui
life.
|
[in]
|
secondstate
|
若
true
a second state for toggle and clickable buttons is stored.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SetImage()
[2/4]
Sets the image from a
Filename
.
-
参数
-
[in]
|
name
|
The filename for the image to load.
|
[in]
|
secondstate
|
若
true
a second state for toggle and clickable buttons is stored.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SetImage()
[3/4]
Sets the image from an
IconData
.
-
警告
-
The icon bitmap is copied.
-
参数
-
[in]
|
bmp
|
The icon data. The caller owns the pointed icon data.
|
[in]
|
secondstate
|
若
true
a second state for toggle and clickable buttons is stored.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SetImage()
[4/4]
Sets the image from an icon ID.
-
警告
-
The icon bitmap is copied.
-
参数
-
[in]
|
icon_id
|
The icon ID.
|
[in]
|
secondstate
|
若
true
a second state for toggle and clickable buttons is stored.
|
-
返回
-
true
if successful, otherwise
false
.
◆
SetToggleState()
void SetToggleState
|
(
|
Bool
|
set
|
)
|
|
Sets the toggle state of the button.
-
参数
-
[in]
|
set
|
The new toggle state.
|
◆
SetDragArray()
Stores an atom array that can be dragged from the button by the user. This is only possible for non-button mode (
BITMAPBUTTON_BUTTON
is
false
).
-
参数
-
[in]
|
bl
|
The atom array to store. The array is not copied. The caller owns the pointed array.
|
◆
SetCallback()
Registers a callback with the bitmap button. Called when the button is pressed.
-
参数
-
[in]
|
cb
|
The callback to register.
|
◆
SetCommandDragId()
void SetCommandDragId
|
(
|
Int32
|
cmdid
|
)
|
|
Sets the command ID for the bitmap button.
-
注意
-
Enables drag and drop of the command into tool bars and menu managers. Used e.g. in the Script Manager.
-
参数
-
[in]
|
cmdid
|
The command ID.
|
◆
GetMaxWidth()
Int32
GetMaxWidth
|
(
|
|
)
|
const
|
Gets the maximum width of the user area that the Bitmap is being drawn into, allowing you to size the bitmap prior to setting.
-
返回
-
The maximum width.