#include <customgui_bitmapbutton.h>
Bitmap button custom GUI (CUSTOMGUI_BITMAPBUTTON).
Here are the settings: BITMAPBUTTON_CUSTOMGUISETTINGS
◆ BitmapButtonCustomGui()
◆ ~BitmapButtonCustomGui()
◆ SetImage() [1/4]
Sets the image from a BaseBitmap.
- Parameters
-
[in] | bmp | The bitmap image. |
[in] | copybmp | If 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 | If true a second state for toggle and clickable buttons is stored. |
- Returns
- true if successful, otherwise false.
◆ SetImage() [2/4]
Sets the image from a Filename.
- Parameters
-
[in] | name | The filename for the image to load. |
[in] | secondstate | If true a second state for toggle and clickable buttons is stored. |
- Returns
- true if successful, otherwise false.
◆ SetImage() [3/4]
Sets the image from an IconData.
- Warning
- The icon bitmap is copied.
- Parameters
-
[in] | bmp | The icon data. The caller owns the pointed icon data. |
[in] | secondstate | If true a second state for toggle and clickable buttons is stored. |
- Returns
- true if successful, otherwise false.
◆ SetImage() [4/4]
Sets the image from an icon ID.
- Warning
- The icon bitmap is copied.
- Parameters
-
[in] | icon_id | The icon ID. |
[in] | secondstate | If true a second state for toggle and clickable buttons is stored. |
- Returns
- true if successful, otherwise false.
◆ SetToggleState()
void SetToggleState |
( |
Bool |
set | ) |
|
Sets the toggle state of the button.
- Parameters
-
[in] | set | The new toggle state. |
◆ SetTooltip()
void SetTooltip |
( |
const String & |
tooltip | ) |
|
Sets the tooltip string of the button.
- Parameters
-
[in] | tooltip | The tooltip string. |
◆ 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).
- Parameters
-
[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.
- Parameters
-
[in] | cb | The callback to register. |
◆ SetCommandDragId()
void SetCommandDragId |
( |
Int32 |
cmdid | ) |
|
Sets the command ID for the bitmap button.
- Note
- Enables drag and drop of the command into tool bars and menu managers. Used e.g. in the Script Manager.
- Parameters
-
◆ 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.
- Returns
- The maximum width.