diff options
Diffstat (limited to 'indra/newview/llmoveview.h')
-rw-r--r-- | indra/newview/llmoveview.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index cee6078ee9..06463f02af 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -46,6 +46,7 @@ class LLJoystickAgentSlide; class LLFloaterMove : public LLTransientDockableFloater { + LOG_CLASS(LLFloaterMove); friend class LLFloaterReg; private: @@ -55,6 +56,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void setEnabled(BOOL enabled); + /*virtual*/ void setVisible(BOOL visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); void setFlyingModeImpl(BOOL fly); @@ -96,7 +98,6 @@ private: void updateButtonsWithMovementMode(const EMovementMode newMode); void updatePosition(); void showModeButtons(BOOL bShow); - void updateHeight(bool show_mode_buttons); public: @@ -126,6 +127,7 @@ private: */ class LLPanelStandStopFlying : public LLPanel { + LOG_CLASS(LLPanelStandStopFlying); public: typedef enum stand_stop_flying_mode_t { @@ -133,6 +135,19 @@ public: SSFM_STOP_FLYING } EStandStopFlyingMode; + /** + * Attach or detach the panel to/from the movement controls floater. + * + * Called when the floater gets opened/closed, user sits, stands up or starts/stops flying. + * + * @param move_view The floater to attach to (not always accessible via floater registry). + * If NULL is passed, the panel gets reparented to its original container. + * + * @see mAttached + * @see mOriginalParent + */ + void reparent(LLFloaterMove* move_view); + static LLPanelStandStopFlying* getInstance(); static void setStandStopFlyingMode(EStandStopFlyingMode mode); static void clearStandStopFlyingMode(EStandStopFlyingMode mode); @@ -157,6 +172,23 @@ private: LLButton* mStandButton; LLButton* mStopFlyingButton; + + /** + * The original parent of the panel. + * + * Makes it possible to move (reparent) the panel to the movement controls floater and back. + * + * @see reparent() + */ + LLHandle<LLPanel> mOriginalParent; + + /** + * True if the panel is currently attached to the movement controls floater. + * + * @see reparent() + * @see updatePosition() + */ + bool mAttached; }; |