BControl: Add icon support
The icon is meant as an addition to or replacement of the label. Icon bitmaps for various states of the control (off, on, partially on, each enabled or disabled, plus up to 125 custom states) can be set individually via SetIconBitmap() (getter IconBitmap()). The convenience method SetIcon() can be used to set the bitmaps for the standard states from a single bitmap; it also supports cropping the icon to its non-transparent area. Code borrowed from BIconButton.
This commit is contained in:
@@ -29,12 +29,12 @@ enum {
|
||||
PERFORM_CODE_LAYOUT_INVALIDATED = 1007,
|
||||
PERFORM_CODE_DO_LAYOUT = 1008,
|
||||
PERFORM_CODE_GET_TOOL_TIP_AT = 1009,
|
||||
PERFORM_CODE_LAYOUT_CHANGED = 1010,
|
||||
PERFORM_CODE_SET_ICON = 1011,
|
||||
|
||||
// support kit
|
||||
PERFORM_CODE_ALL_ARCHIVED = 1010,
|
||||
PERFORM_CODE_ALL_UNARCHIVED = 1011,
|
||||
|
||||
PERFORM_CODE_LAYOUT_CHANGED = 1012
|
||||
PERFORM_CODE_ALL_ARCHIVED = 2000,
|
||||
PERFORM_CODE_ALL_UNARCHIVED = 2001,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -51,4 +51,10 @@ struct perform_data_get_tool_tip_at {
|
||||
bool return_value;
|
||||
};
|
||||
|
||||
struct perform_data_set_icon {
|
||||
const BBitmap* icon;
|
||||
uint32 flags;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _BINARY_COMPATIBILITY_INTERFACE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user