lltabcontainervertical.h

Go to the documentation of this file.
00001 
00032 // Fear my script-fu!
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 // const S32 TABCNTRV_TAB_HEIGHT = 16;  Use BTN_HEIGHT instead, JC.
00043 const S32 TABCNTRV_ARROW_BTN_SIZE = 16;
00044 const S32 TABCNTRV_BUTTON_PANEL_OVERLAP = 1;  // how many pixels the tab buttons and tab panels overlap.
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         /*virtual*/ void initButtons();
00062         
00063         /*virtual*/ ~LLTabContainerVertical();
00064         
00065         virtual LLXMLNodePtr getXML(bool save_children = true) const;
00066         /*virtual*/ void draw();
00067 
00068         /*virtual*/ 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         /*virtual*/ BOOL selectTab(S32 which);
00078         /*virtual*/ void removeTabPanel( LLPanel* child );
00079 
00080         /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
00081         /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask );
00082         /*virtual*/ BOOL handleMouseUp( S32 x, S32 y, MASK mask );
00083         /*virtual*/ 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

Generated on Thu Jul 1 06:09:15 2010 for Second Life Viewer by  doxygen 1.4.7