diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
commit | bccc10db9a90d365c353baebf443fde2030ce970 (patch) | |
tree | 2c2e1fd94b29667a809f8d7285d049f5ff5d424d /indra/llui/llchatentry.h | |
parent | 531cd34f670170ade57f8813fe48012b61a1d3c2 (diff) | |
parent | bb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff) |
Merge branch 'main' into marchcat/x-b-merge
# Conflicts:
# autobuild.xml
# indra/cmake/ConfigurePkgConfig.cmake
# indra/cmake/ICU4C.cmake
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
# indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
# indra/newview/llappviewerlinux_api.h
# indra/newview/llappviewerlinux_api_dbus.cpp
# indra/newview/llappviewerlinux_api_dbus.h
# indra/newview/llfloateremojipicker.cpp
# indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/llui/llchatentry.h')
-rw-r--r-- | indra/llui/llchatentry.h | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h index 3f13691a30..f7473b320d 100644 --- a/indra/llui/llchatentry.h +++ b/indra/llui/llchatentry.h @@ -4,8 +4,8 @@ * @brief Text editor widget which is used for user input * * Features: - * Optional line history so previous entries can be recalled by CTRL UP/DOWN - * Optional auto-resize behavior on input chat field + * Optional line history so previous entries can be recalled by CTRL UP/DOWN + * Optional auto-resize behavior on input chat field * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code @@ -38,69 +38,69 @@ class LLChatEntry : public LLTextEditor { public: - struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> - { - Optional<bool> has_history, - is_expandable; + struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> + { + Optional<bool> has_history, + is_expandable; - Optional<int> expand_lines_count; + Optional<int> expand_lines_count; - Params(); - }; + Params(); + }; - virtual ~LLChatEntry(); + virtual ~LLChatEntry(); protected: - friend class LLUICtrlFactory; - LLChatEntry(const Params& p); + friend class LLUICtrlFactory; + LLChatEntry(const Params& p); /*virtual*/ void beforeValueChange(); /*virtual*/ void onValueChange(S32 start, S32 end); /*virtual*/ bool useLabel() const; public: - virtual void draw(); - virtual void onCommit(); - /*virtual*/ void onFocusReceived(); - /*virtual*/ void onFocusLost(); + virtual void draw(); + virtual void onCommit(); + /*virtual*/ void onFocusReceived(); + /*virtual*/ void onFocusLost(); - void enableSingleLineMode(bool single_line_mode); - boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb); + void enableSingleLineMode(bool single_line_mode); + boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb); private: - /** - * Implements auto-resize behavior. - * When user's typing reaches the right edge of the chat field - * the chat field expands vertically by one line. The bottom of - * the chat field remains bottom-justified. The chat field does - * not expand beyond mExpandLinesCount. - */ - void expandText(); - - /** - * Implements line history so previous entries can be recalled by CTRL UP/DOWN - */ - void updateHistory(); - - BOOL handleSpecialKey(const KEY key, const MASK mask); - - - // Fired when text height expanded to mExpandLinesCount - commit_signal_t* mTextExpandedSignal; - - // line history support: - typedef std::vector<std::string> line_history_t; - line_history_t::iterator mCurrentHistoryLine; // currently browsed history line - line_history_t mLineHistory; // line history storage - bool mHasHistory; // flag for enabled/disabled line history - bool mIsExpandable; - bool mSingleLineMode; - - S32 mExpandLinesCount; - S32 mPrevLinesCount; - S32 mPrevExpandedLineCount; + /** + * Implements auto-resize behavior. + * When user's typing reaches the right edge of the chat field + * the chat field expands vertically by one line. The bottom of + * the chat field remains bottom-justified. The chat field does + * not expand beyond mExpandLinesCount. + */ + void expandText(); + + /** + * Implements line history so previous entries can be recalled by CTRL UP/DOWN + */ + void updateHistory(); + + BOOL handleSpecialKey(const KEY key, const MASK mask); + + + // Fired when text height expanded to mExpandLinesCount + commit_signal_t* mTextExpandedSignal; + + // line history support: + typedef std::vector<std::string> line_history_t; + line_history_t::iterator mCurrentHistoryLine; // currently browsed history line + line_history_t mLineHistory; // line history storage + bool mHasHistory; // flag for enabled/disabled line history + bool mIsExpandable; + bool mSingleLineMode; + + S32 mExpandLinesCount; + S32 mPrevLinesCount; + S32 mPrevExpandedLineCount; }; #endif /* LLCHATENTRY_H_ */ |