summaryrefslogtreecommitdiff
path: root/indra/llui/lltoolbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltoolbar.h')
-rwxr-xr-xindra/llui/lltoolbar.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 743951a41f..9e17eaed8b 100755
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -125,6 +125,19 @@ namespace LLToolBarEnums
SIDE_TOP,
};
+ enum EToolBarLocation
+ {
+ TOOLBAR_NONE = 0,
+ TOOLBAR_LEFT,
+ TOOLBAR_RIGHT,
+ TOOLBAR_BOTTOM,
+
+ TOOLBAR_COUNT,
+
+ TOOLBAR_FIRST = TOOLBAR_LEFT,
+ TOOLBAR_LAST = TOOLBAR_BOTTOM,
+ };
+
LLLayoutStack::ELayoutOrientation getOrientation(SideType sideType);
}
@@ -150,6 +163,30 @@ class LLToolBar
{
friend class LLToolBarButton;
public:
+
+ class LLCenterLayoutPanel : public LLLayoutPanel
+ {
+ public:
+ typedef struct LLLayoutPanel::Params Params;
+ typedef boost::function<void(LLToolBarEnums::EToolBarLocation tb, const LLRect& rect)> reshape_callback_t;
+
+ virtual ~LLCenterLayoutPanel() {}
+ /*virtual*/ void handleReshape(const LLRect& rect, bool by_user);
+
+ void setLocationId(LLToolBarEnums::EToolBarLocation id) { mLocationId = id; }
+ void setReshapeCallback(reshape_callback_t cb) { mReshapeCallback = cb; }
+ void setButtonPanel(LLPanel * panel) { mButtonPanel = panel; }
+
+ protected:
+ friend class LLUICtrlFactory;
+ LLCenterLayoutPanel(const Params& params) : LLLayoutPanel(params), mButtonPanel(NULL) {}
+
+ private:
+ reshape_callback_t mReshapeCallback;
+ LLToolBarEnums::EToolBarLocation mLocationId;
+ LLPanel * mButtonPanel;
+ };
+
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Mandatory<LLToolBarEnums::ButtonType> button_display_mode;
@@ -198,6 +235,7 @@ public:
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
void setHandleDropCallback(tool_handledrop_callback_t cb) { mHandleDropCallback = cb; }
bool isReadOnly() const { return mReadOnly; }
+ LLCenterLayoutPanel * getCenterLayoutPanel() const { return mCenterPanel; }
LLToolBarButton* createButton(const LLCommandId& id);
@@ -270,6 +308,7 @@ private:
// related widgets
LLLayoutStack* mCenteringStack;
+ LLCenterLayoutPanel* mCenterPanel;
LLPanel* mButtonPanel;
LLHandle<class LLContextMenu> mPopupMenuHandle;
LLHandle<class LLView> mRemoveButtonHandle;