summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.h
diff options
context:
space:
mode:
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;