diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-02-20 23:46:23 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-21 03:00:25 +0200 |
commit | a5261a5fa8fad810ecb5c260d92c3e771822bf58 (patch) | |
tree | d9e9cda2137f01538f7ac98ce5e8dfa10980eaac /indra/llui/llfloater.h | |
parent | 8c16ec2b53153a10f40181e0e8108d24331451d4 (diff) |
Convert BOOL to bool in llui
Diffstat (limited to 'indra/llui/llfloater.h')
-rw-r--r-- | indra/llui/llfloater.h | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 99ec77fa4d..bc315785d3 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -46,20 +46,20 @@ class LLMultiFloater; class LLFloater; -const BOOL RESIZE_YES = TRUE; -const BOOL RESIZE_NO = FALSE; +const bool RESIZE_YES = true; +const bool RESIZE_NO = false; -const BOOL DRAG_ON_TOP = FALSE; -const BOOL DRAG_ON_LEFT = TRUE; +const bool DRAG_ON_TOP = false; +const bool DRAG_ON_LEFT = true; -const BOOL MINIMIZE_YES = TRUE; -const BOOL MINIMIZE_NO = FALSE; +const bool MINIMIZE_YES = true; +const bool MINIMIZE_NO = false; -const BOOL CLOSE_YES = TRUE; -const BOOL CLOSE_NO = FALSE; +const bool CLOSE_YES = true; +const bool CLOSE_NO = false; -const BOOL ADJUST_VERTICAL_YES = TRUE; -const BOOL ADJUST_VERTICAL_NO = FALSE; +const bool ADJUST_VERTICAL_YES = true; +const bool ADJUST_VERTICAL_NO = false; namespace LLFloaterEnums { @@ -219,13 +219,13 @@ public: bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - /*virtual*/ BOOL canSnapTo(const LLView* other_view); + /*virtual*/ bool canSnapTo(const LLView* other_view); /*virtual*/ void setSnappedTo(const LLView* snap_view); - /*virtual*/ void setFocus( BOOL b ); - /*virtual*/ void setIsChrome(BOOL is_chrome); + /*virtual*/ void setFocus( bool b ); + /*virtual*/ void setIsChrome(bool is_chrome); /*virtual*/ void setRect(const LLRect &rect); - void setIsSingleInstance(BOOL is_single_instance); - BOOL getIsSingleInstance() { return mSingleInstance; } + void setIsSingleInstance(bool is_single_instance); + bool getIsSingleInstance() { return mSingleInstance; } void initFloater(const Params& p); @@ -237,7 +237,7 @@ public: // Close the floater or its host. Use when hidding or toggling a floater instance. virtual void closeHostedFloater(); - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); // Release keyboard and mouse focus void releaseFocus(); @@ -254,13 +254,13 @@ public: std::string getTitle() const; void setShortTitle( const std::string& short_title ); std::string getShortTitle() const; - virtual void setMinimized(BOOL b); + virtual void setMinimized(bool b); void moveResizeHandlesToFront(); - void addDependentFloater(LLFloater* dependent, BOOL reposition = TRUE); - void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE); + void addDependentFloater(LLFloater* dependent, bool reposition = true); + void addDependentFloater(LLHandle<LLFloater> dependent_handle, bool reposition = true); LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); } void removeDependentFloater(LLFloater* dependent); - BOOL isMinimized() const { return mMinimized; } + bool isMinimized() const { return mMinimized; } /// isShown() differs from getVisible() in that isShown() also considers /// isMinimized(). isShown() is true only if visible and not minimized. bool isShown() const; @@ -269,17 +269,17 @@ public: static bool isShown(const LLFloater* floater); static bool isVisible(const LLFloater* floater); static bool isMinimized(const LLFloater* floater); - BOOL isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts - virtual BOOL isFrontmost(); - BOOL isDependent() { return !mDependeeHandle.isDead(); } - void setCanMinimize(BOOL can_minimize); - void setCanClose(BOOL can_close); - void setCanTearOff(BOOL can_tear_off); - virtual void setCanResize(BOOL can_resize); - void setCanDrag(BOOL can_drag); + bool isFirstLook() { return mFirstLook; } // EXT-2653: This function is necessary to prevent overlapping for secondary showed toasts + virtual bool isFrontmost(); + bool isDependent() { return !mDependeeHandle.isDead(); } + void setCanMinimize(bool can_minimize); + void setCanClose(bool can_close); + void setCanTearOff(bool can_tear_off); + virtual void setCanResize(bool can_resize); + void setCanDrag(bool can_drag); bool getCanDrag(); void setHost(LLMultiFloater* host); - BOOL isResizable() const { return mResizable; } + bool isResizable() const { return mResizable; } void setResizeLimits( S32 min_width, S32 min_height ); void getResizeLimits( S32* min_width, S32* min_height ) { *min_width = mMinWidth; *min_height = mMinHeight; } @@ -309,16 +309,16 @@ public: // This cannot be "const" until all derived floater canClose() // methods are const as well. JC - virtual BOOL canClose() { return TRUE; } + virtual bool canClose() { return true; } - /*virtual*/ void setVisible(BOOL visible); // do not override - /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); // do not override + /*virtual*/ void setVisible(bool visible); // do not override + /*virtual*/ void onVisibilityChange ( bool new_visibility ); // do not override - void setFrontmost(BOOL take_focus = TRUE, BOOL restore = TRUE); - virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); + void setFrontmost(bool take_focus = true, bool restore = true); + virtual void setVisibleAndFrontmost(bool take_focus=true, const LLSD& key = LLSD()); // Defaults to false. - virtual BOOL canSaveAs() const { return FALSE; } + virtual bool canSaveAs() const { return false; } virtual void saveAs() {} @@ -391,8 +391,8 @@ protected: void setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized const LLRect& getExpandedRect() const { return mExpandedRect; } - void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened - BOOL getAutoFocus() const { return mAutoFocus; } + void setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened + bool getAutoFocus() const { return mAutoFocus; } LLDragHandle* getDragHandle() const { return mDragHandle; } void destroy(); // Don't call this directly. You probably want to call closeFloater() @@ -411,7 +411,7 @@ protected: F32 contex_cone_out_alpha = CONTEXT_CONE_OUT_ALPHA); private: - void setForeground(BOOL b); // called only by floaterview + void setForeground(bool b); // called only by floaterview void cleanupHandles(); // remove handles to dead floaters void createMinimizeButton(); void buildButtons(const Params& p); @@ -428,7 +428,7 @@ private: */ static std::string getButtonTooltip(const Params& p, EFloaterButton e, bool is_chrome); - BOOL offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index); + bool offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index); void addResizeCtrls(); void layoutResizeCtrls(); void addDragHandle(); @@ -474,16 +474,16 @@ private: LLUIString mTitle; LLUIString mShortTitle; - BOOL mSingleInstance; // TRUE if there is only ever one instance of the floater + bool mSingleInstance; // true if there is only ever one instance of the floater bool mReuseInstance; // true if we want to hide the floater when we close it instead of destroying it bool mIsReuseInitialized; // true if mReuseInstance already set from parameters std::string mInstanceName; // Store the instance name so we can remove ourselves from the list - BOOL mCanTearOff; - BOOL mCanMinimize; - BOOL mCanClose; - BOOL mDragOnLeft; - BOOL mResizable; + bool mCanTearOff; + bool mCanMinimize; + bool mCanClose; + bool mDragOnLeft; + bool mResizable; LLFloaterEnums::EOpenPositioning mPositioning; LLCoordFloater mPosition; @@ -493,12 +493,12 @@ private: S32 mHeaderHeight; // height in pixels of header for title, drag bar S32 mLegacyHeaderHeight;// HACK see initFloaterXML() - BOOL mMinimized; - BOOL mForeground; + bool mMinimized; + bool mForeground; LLHandle<LLFloater> mDependeeHandle; - BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible. + bool mFirstLook; // true if the _next_ time this floater is visible will be the first time in the session that it is visible. typedef std::set<LLHandle<LLFloater> > handle_set_t; typedef std::set<LLHandle<LLFloater> >::iterator handle_set_iter_t; @@ -506,7 +506,7 @@ private: bool mButtonsEnabled[BUTTON_COUNT]; F32 mButtonScale; - BOOL mAutoFocus; + bool mAutoFocus; LLHandle<LLFloater> mSnappedTo; LLHandle<LLFloater> mHostHandle; @@ -517,7 +517,7 @@ private: bool mTornOff; static LLMultiFloater* sHostp; - static BOOL sQuitting; + static bool sQuitting; static std::string sButtonNames[BUTTON_COUNT]; static std::string sButtonToolTips[BUTTON_COUNT]; static std::string sButtonToolTipsIndex[BUTTON_COUNT]; @@ -525,7 +525,7 @@ private: typedef void(*click_callback)(LLFloater*); static click_callback sButtonCallbacks[BUTTON_COUNT]; - BOOL mHasBeenDraggedWhileMinimized; + bool mHasBeenDraggedWhileMinimized; S32 mPreviousMinimizedBottom; S32 mPreviousMinimizedLeft; @@ -551,7 +551,7 @@ protected: public: - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void reshape(S32 width, S32 height, bool called_from_parent = true); /*virtual*/ void draw(); /*virtual*/ LLRect getSnapRect() const; /*virtual*/ void refresh(); @@ -559,25 +559,25 @@ public: LLRect findNeighboringPosition( LLFloater* reference_floater, LLFloater* neighbor ); // Given a child of gFloaterView, make sure this view can fit entirely onscreen. - void adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside, BOOL snap_in_toolbars = false); + void adjustToFitScreen(LLFloater* floater, bool allow_partial_outside, bool snap_in_toolbars = false); void setMinimizePositionVerticalOffset(S32 offset) { mMinimizePositionVOffset = offset; } void getMinimizePosition( S32 *left, S32 *bottom); void restoreAll(); // un-minimize all floaters typedef std::set<LLView*> skip_list_t; - void pushVisibleAll(BOOL visible, const skip_list_t& skip_list = skip_list_t()); + void pushVisibleAll(bool visible, const skip_list_t& skip_list = skip_list_t()); void popVisibleAll(const skip_list_t& skip_list = skip_list_t()); - void setCycleMode(BOOL mode) { mFocusCycleMode = mode; } - BOOL getCycleMode() const { return mFocusCycleMode; } - void bringToFront( LLFloater* child, BOOL give_focus = TRUE, BOOL restore = TRUE ); + void setCycleMode(bool mode) { mFocusCycleMode = mode; } + bool getCycleMode() const { return mFocusCycleMode; } + void bringToFront( LLFloater* child, bool give_focus = true, bool restore = true ); void highlightFocusedFloater(); void unhighlightFocusedFloater(); void focusFrontFloater(); void destroyAllChildren(); // attempt to close all floaters void closeAllChildren(bool app_quitting); - BOOL allChildrenClosed(); + bool allChildrenClosed(); void shiftFloaters(S32 x_offset, S32 y_offset); void hideAllFloaters(); @@ -608,7 +608,7 @@ private: LLRect mToolbarBottomRect; LLRect mToolbarRightRect; LLHandle<LLView> mSnapView; - BOOL mFocusCycleMode; + bool mFocusCycleMode; S32 mSnapOffsetBottom; S32 mSnapOffsetRight; S32 mMinimizePositionVOffset; |