00001
00032
00033
00034 #ifndef LL_TABCONTAINERVERTICAL_H
00035 #define LL_TABCONTAINERVERTICAL_H
00036
00037 #include "lltabcontainer.h"
00038
00039 const S32 TABCNTRV_CLOSE_BTN_SIZE = 16;
00040 const S32 TABCNTRV_HEADER_HEIGHT = LLPANEL_BORDER_WIDTH + TABCNTRV_CLOSE_BTN_SIZE;
00041 const S32 TABCNTRV_TAB_WIDTH = 100;
00042
00043 const S32 TABCNTRV_ARROW_BTN_SIZE = 16;
00044 const S32 TABCNTRV_BUTTON_PANEL_OVERLAP = 1;
00045 const S32 TABCNTRV_PAD = 0;
00046
00047 class LLButton;
00048 class LLTextBox;
00049
00050 class LLTabContainerVertical : public LLTabContainerCommon
00051 {
00052 public:
00053 LLTabContainerVertical( const LLString& name, const LLRect& rect,
00054 void(*close_callback)(void*), void* callback_userdata,
00055 U32 tab_width = TABCNTRV_TAB_WIDTH, BOOL bordered = TRUE);
00056
00057 LLTabContainerVertical( const LLString& name, const LLString& rect_control,
00058 void(*close_callback)(void*), void* callback_userdata,
00059 U32 tab_width = TABCNTRV_TAB_WIDTH, BOOL bordered = TRUE);
00060
00061 void initButtons();
00062
00063 ~LLTabContainerVertical();
00064
00065 virtual LLXMLNodePtr getXML(bool save_children = true) const;
00066 void draw();
00067
00068 void addTabPanel(LLPanel* child,
00069 const LLString& label,
00070 BOOL select = FALSE,
00071 void (*on_tab_clicked)(void*, bool) = NULL,
00072 void* userdata = NULL,
00073 S32 indent = 0,
00074 BOOL placeholder = FALSE,
00075 eInsertionPoint insertion_point = END);
00076
00077 BOOL selectTab(S32 which);
00078 void removeTabPanel( LLPanel* child );
00079
00080 BOOL handleMouseDown( S32 x, S32 y, MASK mask );
00081 BOOL handleHover( S32 x, S32 y, MASK mask );
00082 BOOL handleMouseUp( S32 x, S32 y, MASK mask );
00083 BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
00084
00085 protected:
00086 U32 mTabWidth;
00087
00088 LLButton* mUpArrowBtn;
00089 LLButton* mDownArrowBtn;
00090
00091 protected:
00092 virtual void updateMaxScrollPos();
00093 virtual void commitHoveredButton(S32 x, S32 y);
00094 };
00095
00096
00097 #endif