BitmapButtonCustomGui Class Reference

#include <customgui_bitmapbutton.h>

Inheritance diagram for BitmapButtonCustomGui:

详细描述

Bitmap button custom GUI ( CUSTOMGUI_BITMAPBUTTON ).
Here are the settings: BITMAPBUTTON_CUSTOMGUISETTINGS

私有成员函数

  BitmapButtonCustomGui ()
  ~BitmapButtonCustomGui ()

Set Image

Bool   SetImage ( BaseBitmap *bmp, Bool copybmp, Bool secondstate=false)
Bool   SetImage (const Filename &name, Bool secondstate=false)
Bool   SetImage ( IconData *bmp, Bool secondstate=false)
Bool   SetImage ( Int32 icon_id, Bool secondstate=false)

杂项

void  SetToggleState ( Bool set)
void  SetDragArray (const AtomArray *bl)
void  SetCallback (const BitmapButtonCallback &cb)
void  SetCommandDragId ( Int32 cmdid)
Int32   GetMaxWidth () const

Additional Inherited Members

-  Public Member Functions inherited from BaseCustomGui< 1000479 >
Int32   GetWidth ()
Int32   GetHeight ()
void  Redraw ()
Bool   LayoutChanged ()
Bool   激活 ()
Bool   SetDefaultForResEdit ()
Bool   SetData (const TriState < GeData > &tristate)
TriState < GeData GetData ()
void  SetLayoutMode ( Int32 mode)
Int32   GetLayoutMode ()
Bool   SupportLayoutSwitch ()
-  Public Member Functions inherited from _BaseCustomGui
Int32   GetWidth ( Int32 plugid)
Int32   GetHeight ( Int32 plugid)
void  Redraw ( Int32 plugid)
Bool   LayoutChanged ( Int32 plugid)
Bool   激活 ( Int32 plugid)
Bool   SetDefaultForResEdit ( Int32 plugid)
Bool   SetData ( Int32 plugid, const TriState < GeData > &tristate)
TriState < GeData GetData ( Int32 plugid)
void  SetLayoutMode ( Int32 plugid, Int32 mode)
Int32   GetLayoutMode ( Int32 plugid)
Bool   SupportLayoutSwitch ( Int32 plugid)

构造函数 & 析构函数文档编制

◆  BitmapButtonCustomGui()

BitmapButtonCustomGui () private

◆  ~BitmapButtonCustomGui()

~ BitmapButtonCustomGui () private

成员函数文档编制

◆  SetImage() [1/4]

Bool SetImage ( BaseBitmap bmp ,
Bool   copybmp ,
Bool   secondstate = false  
)

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]

Bool SetImage ( const Filename name ,
Bool   secondstate = false  
)

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]

Bool SetImage ( IconData bmp ,
Bool   secondstate = false  
)

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]

Bool SetImage ( Int32   icon_id ,
Bool   secondstate = false  
)

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()

void SetDragArray ( const AtomArray bl )

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()

void SetCallback ( const BitmapButtonCallback cb )

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.