diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Tabs.H | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/FL/Fl_Tabs.H b/FL/Fl_Tabs.H index 3d75db81d..06c23aee5 100644 --- a/FL/Fl_Tabs.H +++ b/FL/Fl_Tabs.H @@ -208,6 +208,7 @@ class FL_EXPORT Fl_Tabs : public Fl_Group { int tab_height(); void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0); protected: + Fl_Align tab_align_; // tab label alignment void redraw_tabs(); void draw(); @@ -231,6 +232,24 @@ public: Fl_Widget *which(int event_x, int event_y); ~Fl_Tabs(); void client_area(int &rx, int &ry, int &rw, int &rh, int tabh=0); + /** + Sets the tab label alignment. + + The default is FL_ALIGN_CENTER so tab labels are centered, but since + the label space is measured (per label) to fit the labels, there + wouldn't be any difference if labels were aligned left or right. + + If you want to show an image (icon) next to the group's label you can + set a different label alignment. FL_ALIGN_IMAGE_NEXT_TO_TEXT is the + recommended alignment to show the icon left of the text. + */ + void tab_align(Fl_Align a) {tab_align_ = a;} + /** + Gets the tab label alignment. + + \see tab_align(Fl_Align) + */ + Fl_Align tab_align() const {return tab_align_;} }; #endif |
