BControlLook: Add methods for getting insets

* Update the previously unused frame_type and background_type enums.
* Add methods GetFrameInsets(), GetBackgroundInsets(), GetInsets() to
  get the insets for a given frame type, background type, or both
  respectively.
This commit is contained in:
Ingo Weinhold
2013-12-22 02:48:23 +01:00
parent d3e73d457e
commit 8719e0dc4b
2 changed files with 101 additions and 5 deletions
+21 -5
View File
@@ -35,16 +35,20 @@ public:
enum frame_type {
B_BUTTON_FRAME,
B_MENU_FRAME,
B_LISTVIEW_FRAME,
B_INPUT_FRAME
B_GROUP_FRAME,
B_MENU_FIELD_FRAME,
B_SCROLL_VIEW_FRAME,
B_TEXT_CONTROL_FRAME,
};
enum background_type {
B_BUTTON_BACKGROUND,
B_MENU_BACKGROUND,
B_LISTVIEW_BACKGROUND,
B_INPUT_BACKGROUND
B_MENU_BAR_BACKGROUND,
B_MENU_FIELD_BACKGROUND,
B_MENU_ITEM_BACKGROUND,
B_HORIZONTAL_SCROLL_BAR_BACKGROUND,
B_VERTICAL_SCROLL_BAR_BACKGROUND,
};
enum {
@@ -332,6 +336,18 @@ public:
const rgb_color& base, uint32 flags,
const BPoint& where);
virtual void GetFrameInsets(frame_type frameType,
uint32 flags, float& _left, float& _top,
float& _right, float& _bottom);
virtual void GetBackgroundInsets(
background_type backgroundType,
uint32 flags, float& _left, float& _top,
float& _right, float& _bottom);
void GetInsets(frame_type frameType,
background_type backgroundType,
uint32 flags, float& _left, float& _top,
float& _right, float& _bottom);
void SetBackgroundInfo(
const BMessage& backgroundInfo);