diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/llpanel.h | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llpanel.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/linden/indra/llui/llpanel.h b/linden/indra/llui/llpanel.h index fea3eee..28c56fa 100644 --- a/linden/indra/llui/llpanel.h +++ b/linden/indra/llui/llpanel.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "llcallbackmap.h" | 35 | #include "llcallbackmap.h" |
36 | #include "lluictrl.h" | 36 | #include "lluictrl.h" |
37 | #include "llviewborder.h" | 37 | #include "llviewborder.h" |
38 | #include "lluistring.h" | ||
38 | #include "v4color.h" | 39 | #include "v4color.h" |
39 | #include <list> | 40 | #include <list> |
40 | #include <queue> | 41 | #include <queue> |
@@ -91,6 +92,8 @@ public: | |||
91 | LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE, | 92 | LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE, |
92 | S32 border_thickness = LLPANEL_BORDER_WIDTH ); | 93 | S32 border_thickness = LLPANEL_BORDER_WIDTH ); |
93 | 94 | ||
95 | void removeBorder(); | ||
96 | |||
94 | virtual ~LLPanel(); | 97 | virtual ~LLPanel(); |
95 | virtual void draw(); | 98 | virtual void draw(); |
96 | virtual void refresh(); // called in setFocus() | 99 | virtual void refresh(); // called in setFocus() |
@@ -117,6 +120,7 @@ public: | |||
117 | LLString getLabel() const { return mLabel; } | 120 | LLString getLabel() const { return mLabel; } |
118 | 121 | ||
119 | void setRectControl(const LLString& rect_control) { mRectControl.assign(rect_control); } | 122 | void setRectControl(const LLString& rect_control) { mRectControl.assign(rect_control); } |
123 | void storeRectControl(); | ||
120 | 124 | ||
121 | void setBorderVisible( BOOL b ); | 125 | void setBorderVisible( BOOL b ); |
122 | 126 | ||
@@ -136,8 +140,12 @@ public: | |||
136 | virtual LLXMLNodePtr getXML(bool save_children = true) const; | 140 | virtual LLXMLNodePtr getXML(bool save_children = true) const; |
137 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | 141 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); |
138 | BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | 142 | BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); |
143 | void initChildrenXML(LLXMLNodePtr node, LLUICtrlFactory* factory); | ||
139 | void setPanelParameters(LLXMLNodePtr node, LLView *parentp); | 144 | void setPanelParameters(LLXMLNodePtr node, LLView *parentp); |
140 | 145 | ||
146 | LLString getFormattedUIString(const LLString& name, const LLString::format_map_t& args = LLUIString::sNullArgs) const; | ||
147 | LLUIString getUIString(const LLString& name) const; | ||
148 | |||
141 | // ** Wrappers for setting child properties by name ** -TomY | 149 | // ** Wrappers for setting child properties by name ** -TomY |
142 | 150 | ||
143 | // Override to set not found list | 151 | // Override to set not found list |
@@ -216,6 +224,8 @@ public: | |||
216 | typedef std::queue<LLAlertInfo> alert_queue_t; | 224 | typedef std::queue<LLAlertInfo> alert_queue_t; |
217 | static alert_queue_t sAlertQueue; | 225 | static alert_queue_t sAlertQueue; |
218 | 226 | ||
227 | typedef std::map<LLString, LLUIString> ui_string_map_t; | ||
228 | |||
219 | private: | 229 | private: |
220 | // common constructor | 230 | // common constructor |
221 | void init(); | 231 | void init(); |
@@ -241,6 +251,8 @@ protected: | |||
241 | LLString mLabel; | 251 | LLString mLabel; |
242 | S32 mLastTabGroup; | 252 | S32 mLastTabGroup; |
243 | 253 | ||
254 | ui_string_map_t mUIStrings; | ||
255 | |||
244 | typedef std::map<LLString, EWidgetType> requirements_map_t; | 256 | typedef std::map<LLString, EWidgetType> requirements_map_t; |
245 | requirements_map_t mRequirements; | 257 | requirements_map_t mRequirements; |
246 | 258 | ||
@@ -248,4 +260,50 @@ protected: | |||
248 | static panel_map_t sPanelMap; | 260 | static panel_map_t sPanelMap; |
249 | }; | 261 | }; |
250 | 262 | ||
263 | class LLLayoutStack : public LLView | ||
264 | { | ||
265 | public: | ||
266 | typedef enum e_layout_orientation | ||
267 | { | ||
268 | HORIZONTAL, | ||
269 | VERTICAL | ||
270 | } eLayoutOrientation; | ||
271 | |||
272 | LLLayoutStack(eLayoutOrientation orientation); | ||
273 | virtual ~LLLayoutStack(); | ||
274 | |||
275 | /*virtual*/ void draw(); | ||
276 | /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); | ||
277 | /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; | ||
278 | /*virtual*/ void removeCtrl(LLUICtrl* ctrl); | ||
279 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_LAYOUT_STACK; } | ||
280 | virtual LLString getWidgetTag() const { return LL_LAYOUT_STACK_TAG; } | ||
281 | |||
282 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | ||
283 | |||
284 | S32 getMinWidth(); | ||
285 | S32 getMinHeight(); | ||
286 | |||
287 | void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, S32 index = S32_MAX); | ||
288 | void removePanel(LLPanel* panel); | ||
289 | void updateLayout(BOOL force_resize = FALSE); | ||
290 | |||
291 | protected: | ||
292 | struct LLEmbeddedPanel; | ||
293 | |||
294 | LLEmbeddedPanel* findEmbeddedPanel(LLPanel* panelp); | ||
295 | void calcMinExtents(); | ||
296 | S32 getMinStackSize(); | ||
297 | S32 getCurStackSize(); | ||
298 | |||
299 | protected: | ||
300 | eLayoutOrientation mOrientation; | ||
301 | |||
302 | typedef std::vector<LLEmbeddedPanel*> e_panel_list_t; | ||
303 | e_panel_list_t mPanels; | ||
304 | |||
305 | S32 mMinWidth; | ||
306 | S32 mMinHeight; | ||
307 | }; | ||
308 | |||
251 | #endif | 309 | #endif |