summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.h
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2011-04-27 12:00:35 -0700
committerMerov Linden <merov@lindenlab.com>2011-04-27 12:00:35 -0700
commitb4cbe982259719c6461c92247a32a0b26634ced8 (patch)
tree348c375f3fa2ee959f064f000715d19c48f759c4 /indra/newview/llbottomtray.h
parente6bd982c00fe0f08a6640a19ef0adfda75d4d3ed (diff)
parent518181200dec957dccdfdd460fca06b53cb22b5a (diff)
STORM-1028 : pull into viewer-development
Diffstat (limited to 'indra/newview/llbottomtray.h')
-rw-r--r--indra/newview/llbottomtray.h49
1 files changed, 44 insertions, 5 deletions
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 04e5f5e9e0..52bcd2ddac 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -112,10 +112,6 @@ public:
void showBottomTrayContextMenu(S32 x, S32 y, MASK mask);
- void showGestureButton(BOOL visible);
- void showMoveButton(BOOL visible);
- void showCameraButton(BOOL visible);
- void showSnapshotButton(BOOL visible);
void showSpeakButton(bool visible);
void toggleMovementControls();
@@ -240,8 +236,9 @@ private:
*
* @params[in, out] available_width - reference to available width to be used to show buttons.
* @see processShowButton()
+ * @return consumed pixels (difference in available width).
*/
- void processShowButtons(S32& available_width);
+ S32 processShowButtons(S32& available_width);
/**
* Tries to show panel with specified button using available width.
@@ -317,6 +314,20 @@ private:
void processExtendButtons(S32& available_width);
/**
+ * Extends the Speak button if there is anough headroom.
+ *
+ * Unlike other buttons, the Speak buttons has only two possible widths:
+ * the minimal one (without label) and the maximal (default) one.
+ *
+ * If the button is at its minimum width there is not enough headroom to
+ * reshape it to the maximum width, the method does nothing.
+ *
+ * @param available_width Available headroom.
+ * @return false if the button requires extension but there's not enough headroom, true otherwise.
+ */
+ bool processExtendSpeakButton(S32& available_width);
+
+ /**
* Extends shown button to increase total taken space.
*
* @params[in] processed_object_type - type of button to be extended.
@@ -365,6 +376,16 @@ private:
static bool toggleShowButton(EResizeState button_type, const LLSD& new_visibility);
/**
+ * Show the button if there is enough space.
+ *
+ * @param[in] button_type - type of button to be shown.
+ * @param[in, out] available_width amount of available space on the bottom bar.
+ *
+ * @return true if button was shown, false that's not possible (not enough space, etc)
+ */
+ bool showButton(EResizeState button_type, S32& available_width);
+
+ /**
* Sets passed visibility to object specified by resize type.
*/
void setTrayButtonVisible(EResizeState shown_object_type, bool visible);
@@ -417,9 +438,27 @@ private:
*/
void processChatbarCustomization(S32 new_width);
+ /**
+ * @return difference between current chiclet panel width and the minimum.
+ */
+ S32 getChicletPanelShrinkHeadroom() const;
+
/// Get button name for debugging.
static std::string resizeStateToString(EResizeState state);
+ /// Dump a mask for debugging
+ static std::string resizeStateMaskToString(MASK mask);
+
+ /// @return true if any of the the passed buttons have been auto-hidden due to lack of available space.
+ bool isAutoHidden(MASK button_types) const;
+
+ /**
+ * (Un)Mark the buttons as hidden.
+ *
+ * Auto-hidden buttons are those that re-appear as soon as we have enough available space.
+ */
+ void setAutoHidden(MASK button_types, bool hide);
+
/// Buttons automatically hidden due to lack of space.
MASK mResizeState;