Otclient  14/8/2020
uiwidget.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2020 OTClient <https://github.com/edubart/otclient>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef UIWIDGET_H
24 #define UIWIDGET_H
25 
26 #include "declarations.h"
27 #include "uilayout.h"
28 
34 #include <framework/core/timer.h>
35 
36 template<typename T = int>
37 struct EdgeGroup {
38  EdgeGroup() { top = right = bottom = left = T(0); }
39  void set(T value) { top = right = bottom = left = value; }
40  T top;
41  T right;
42  T bottom;
43  T left;
44 };
45 
46 // @bindclass
47 class UIWidget : public LuaObject
48 {
49 // widget core
50 public:
51  UIWidget();
52  virtual ~UIWidget();
53 
54 protected:
55  virtual void draw(const Rect& visibleRect, Fw::DrawPane drawPane);
56  virtual void drawSelf(Fw::DrawPane drawPane);
57  virtual void drawChildren(const Rect& visibleRect, Fw::DrawPane drawPane);
58 
59  friend class UIManager;
60 
61  std::string m_id;
81 
82 public:
83  void addChild(const UIWidgetPtr& child);
84  void insertChild(int index, const UIWidgetPtr& child);
85  void removeChild(UIWidgetPtr child);
86  void focusChild(const UIWidgetPtr& child, Fw::FocusReason reason);
87  void focusNextChild(Fw::FocusReason reason, bool rotate = false);
88  void focusPreviousChild(Fw::FocusReason reason, bool rotate = false);
89  void lowerChild(UIWidgetPtr child);
90  void raiseChild(UIWidgetPtr child);
91  void moveChildToIndex(const UIWidgetPtr& child, int index);
92  void lockChild(const UIWidgetPtr& child);
93  void unlockChild(const UIWidgetPtr& child);
94  void mergeStyle(const OTMLNodePtr& styleNode);
95  void applyStyle(const OTMLNodePtr& styleNode);
96  void addAnchor(Fw::AnchorEdge anchoredEdge, const std::string& hookedWidgetId, Fw::AnchorEdge hookedEdge);
97  void removeAnchor(Fw::AnchorEdge anchoredEdge);
98  void fill(const std::string& hookedWidgetId);
99  void centerIn(const std::string& hookedWidgetId);
100  void breakAnchors();
101  void updateParentLayout();
102  void updateLayout();
103  void lock();
104  void unlock();
105  void focus();
106  void recursiveFocus(Fw::FocusReason reason);
107  void lower();
108  void raise();
109  void grabMouse();
110  void ungrabMouse();
111  void grabKeyboard();
112  void ungrabKeyboard();
113  void bindRectToParent();
114  void destroy();
115  void destroyChildren();
116 
117  void setId(const std::string& id);
118  void setParent(const UIWidgetPtr& parent);
119  void setLayout(const UILayoutPtr& layout);
120  bool setRect(const Rect& rect);
121  void setStyle(const std::string& styleName);
122  void setStyleFromNode(const OTMLNodePtr& styleNode);
123  void setEnabled(bool enabled);
124  void setVisible(bool visible);
125  void setOn(bool on);
126  void setChecked(bool checked);
127  void setFocusable(bool focusable);
128  void setPhantom(bool phantom);
129  void setDraggable(bool draggable);
130  void setFixedSize(bool fixed);
131  void setClipping(bool clipping) { m_clipping = clipping; }
132  void setLastFocusReason(Fw::FocusReason reason);
134  void setAutoRepeatDelay(int delay) { m_autoRepeatDelay = delay; }
135  void setVirtualOffset(const Point& offset);
136 
137  bool isAnchored();
138  bool isChildLocked(const UIWidgetPtr& child);
139  bool hasChild(const UIWidgetPtr& child);
140  int getChildIndex(const UIWidgetPtr& child);
146  UIWidgetPtr getChildAfter(const UIWidgetPtr& relativeChild);
147  UIWidgetPtr getChildBefore(const UIWidgetPtr& relativeChild);
148  UIWidgetPtr getChildById(const std::string& childId);
149  UIWidgetPtr getChildByPos(const Point& childPos);
150  UIWidgetPtr getChildByIndex(int index);
151  UIWidgetPtr recursiveGetChildById(const std::string& id);
152  UIWidgetPtr recursiveGetChildByPos(const Point& childPos, bool wantsPhantom);
156  UIWidgetPtr backwardsGetWidgetById(const std::string& id);
157 
158 private:
159  stdext::boolean<false> m_updateEventScheduled;
160  stdext::boolean<false> m_loadingStyle;
161 
162 
163 // state managment
164 protected:
165  bool setState(Fw::WidgetState state, bool on);
166  bool hasState(Fw::WidgetState state);
167 
168 private:
169  void internalDestroy();
170  void updateState(Fw::WidgetState state);
171  void updateStates();
172  void updateChildrenIndexStates();
173  void updateStyle();
174 
175  stdext::boolean<false> m_updateStyleScheduled;
176  stdext::boolean<true> m_firstOnStyle;
177  OTMLNodePtr m_stateStyle;
178  int m_states;
179 
180 
181 // event processing
182 protected:
183  virtual void onStyleApply(const std::string& styleName, const OTMLNodePtr& styleNode);
184  virtual void onGeometryChange(const Rect& oldRect, const Rect& newRect);
185  virtual void onLayoutUpdate();
186  virtual void onFocusChange(bool focused, Fw::FocusReason reason);
187  virtual void onChildFocusChange(const UIWidgetPtr& focusedChild, const UIWidgetPtr& unfocusedChild, Fw::FocusReason reason);
188  virtual void onHoverChange(bool hovered);
189  virtual void onVisibilityChange(bool visible);
190  virtual bool onDragEnter(const Point& mousePos);
191  virtual bool onDragLeave(UIWidgetPtr droppedWidget, const Point& mousePos);
192  virtual bool onDragMove(const Point& mousePos, const Point& mouseMoved);
193  virtual bool onDrop(UIWidgetPtr draggedWidget, const Point& mousePos);
194  virtual bool onKeyText(const std::string& keyText);
195  virtual bool onKeyDown(uchar keyCode, int keyboardModifiers);
196  virtual bool onKeyPress(uchar keyCode, int keyboardModifiers, int autoRepeatTicks);
197  virtual bool onKeyUp(uchar keyCode, int keyboardModifiers);
198  virtual bool onMousePress(const Point& mousePos, Fw::MouseButton button);
199  virtual bool onMouseRelease(const Point& mousePos, Fw::MouseButton button);
200  virtual bool onMouseMove(const Point& mousePos, const Point& mouseMoved);
201  virtual bool onMouseWheel(const Point& mousePos, Fw::MouseWheelDirection direction);
202  virtual bool onClick(const Point& mousePos);
203  virtual bool onDoubleClick(const Point& mousePos);
204 
205  friend class UILayout;
206 
207  bool propagateOnKeyText(const std::string& keyText);
208  bool propagateOnKeyDown(uchar keyCode, int keyboardModifiers);
209  bool propagateOnKeyPress(uchar keyCode, int keyboardModifiers, int autoRepeatTicks);
210  bool propagateOnKeyUp(uchar keyCode, int keyboardModifiers);
211  bool propagateOnMouseEvent(const Point& mousePos, UIWidgetList& widgetList);
212  bool propagateOnMouseMove(const Point& mousePos, const Point& mouseMoved, UIWidgetList& widgetList);
213 
214 
215 // function shortcuts
216 public:
217  void resize(int width, int height) { setRect(Rect(getPosition(), Size(width, height))); }
218  void move(int x, int y) { setRect(Rect(x, y, getSize())); }
219  void rotate(float degrees) { setRotation(degrees); }
220  void hide() { setVisible(false); }
221  void show() { setVisible(true); }
222  void disable() { setEnabled(false); }
223  void enable() { setEnabled(true); }
224 
225  bool isActive() { return hasState(Fw::ActiveState); }
226  bool isEnabled() { return !hasState(Fw::DisabledState); }
228  bool isFocused() { return hasState(Fw::FocusState); }
229  bool isHovered() { return hasState(Fw::HoverState); }
230  bool isPressed() { return hasState(Fw::PressedState); }
231  bool isFirst() { return hasState(Fw::FirstState); }
232  bool isMiddle() { return hasState(Fw::MiddleState); }
233  bool isLast() { return hasState(Fw::LastState); }
235  bool isChecked() { return hasState(Fw::CheckedState); }
236  bool isOn() { return hasState(Fw::OnState); }
238  bool isVisible() { return !hasState(Fw::HiddenState); }
239  bool isHidden() { return hasState(Fw::HiddenState); }
240  bool isExplicitlyEnabled() { return m_enabled; }
241  bool isExplicitlyVisible() { return m_visible; }
242  bool isFocusable() { return m_focusable; }
243  bool isPhantom() { return m_phantom; }
244  bool isDraggable() { return m_draggable; }
245  bool isFixedSize() { return m_fixedSize; }
246  bool isClipping() { return m_clipping; }
247  bool isDestroyed() { return m_destroyed; }
248 
249  bool hasChildren() { return !m_children.empty(); }
250  bool containsMarginPoint(const Point& point) { return getMarginRect().contains(point); }
251  bool containsPaddingPoint(const Point& point) { return getPaddingRect().contains(point); }
252  bool containsPoint(const Point& point) { return m_rect.contains(point); }
253 
254  std::string getId() { return m_id; }
262  int getChildCount() { return m_children.size(); }
267  std::string getStyleName() { return m_style->tag(); }
269 
270 
271 // base style
272 private:
273  void initBaseStyle();
274  void parseBaseStyle(const OTMLNodePtr& styleNode);
275 
276 protected:
277  void drawBackground(const Rect& screenCoords);
278  void drawBorder(const Rect& screenCoords);
279  void drawIcon(const Rect& screenCoords);
280 
293  float m_opacity;
294  float m_rotation;
297 
298 public:
299  void setX(int x) { move(x, getY()); }
300  void setY(int y) { move(getX(), y); }
301  void setWidth(int width) { resize(width, getHeight()); }
302  void setHeight(int height) { resize(getWidth(), height); }
303  void setSize(const Size& size) { resize(size.width(), size.height()); }
304  void setPosition(const Point& pos) { move(pos.x, pos.y); }
305  void setColor(const Color& color) { m_color = color; }
306  void setBackgroundColor(const Color& color) { m_backgroundColor = color; }
309  void setBackgroundOffset(const Point& pos) { m_backgroundRect.move(pos); }
310  void setBackgroundWidth(int width) { m_backgroundRect.setWidth(width); }
311  void setBackgroundHeight(int height) { m_backgroundRect.setHeight(height); }
312  void setBackgroundSize(const Size& size) { m_backgroundRect.resize(size); }
313  void setBackgroundRect(const Rect& rect) { m_backgroundRect = rect; }
314  void setIcon(const std::string& iconFile);
315  void setIconColor(const Color& color) { m_iconColor = color; }
316  void setIconOffsetX(int x) { m_iconOffset.x = x; }
317  void setIconOffsetY(int y) { m_iconOffset.y = y; }
318  void setIconOffset(const Point& pos) { m_iconOffset = pos; }
319  void setIconWidth(int width) { m_iconRect.setWidth(width); }
320  void setIconHeight(int height) { m_iconRect.setHeight(height); }
321  void setIconSize(const Size& size) { m_iconRect.resize(size); }
322  void setIconRect(const Rect& rect) { m_iconRect = rect; }
323  void setIconClip(const Rect& rect) { m_iconClipRect = rect; }
324  void setIconAlign(Fw::AlignmentFlag align) { m_iconAlign = align; }
325  void setBorderWidth(int width) { m_borderWidth.set(width); updateLayout(); }
326  void setBorderWidthTop(int width) { m_borderWidth.top = width; }
327  void setBorderWidthRight(int width) { m_borderWidth.right = width; }
328  void setBorderWidthBottom(int width) { m_borderWidth.bottom = width; }
329  void setBorderWidthLeft(int width) { m_borderWidth.left = width; }
330  void setBorderColor(const Color& color) { m_borderColor.set(color); updateLayout(); }
331  void setBorderColorTop(const Color& color) { m_borderColor.top = color; }
332  void setBorderColorRight(const Color& color) { m_borderColor.right = color; }
333  void setBorderColorBottom(const Color& color) { m_borderColor.bottom = color; }
334  void setBorderColorLeft(const Color& color) { m_borderColor.left = color; }
335  void setMargin(int margin) { m_margin.set(margin); updateParentLayout(); }
336  void setMarginHorizontal(int margin) { m_margin.right = m_margin.left = margin; updateParentLayout(); }
337  void setMarginVertical(int margin) { m_margin.bottom = m_margin.top = margin; updateParentLayout(); }
338  void setMarginTop(int margin) { m_margin.top = margin; updateParentLayout(); }
339  void setMarginRight(int margin) { m_margin.right = margin; updateParentLayout(); }
340  void setMarginBottom(int margin) { m_margin.bottom = margin; updateParentLayout(); }
341  void setMarginLeft(int margin) { m_margin.left = margin; updateParentLayout(); }
342  void setPadding(int padding) { m_padding.top = m_padding.right = m_padding.bottom = m_padding.left = padding; updateLayout(); }
343  void setPaddingHorizontal(int padding) { m_padding.right = m_padding.left = padding; updateLayout(); }
344  void setPaddingVertical(int padding) { m_padding.bottom = m_padding.top = padding; updateLayout(); }
345  void setPaddingTop(int padding) { m_padding.top = padding; updateLayout(); }
346  void setPaddingRight(int padding) { m_padding.right = padding; updateLayout(); }
347  void setPaddingBottom(int padding) { m_padding.bottom = padding; updateLayout(); }
348  void setPaddingLeft(int padding) { m_padding.left = padding; updateLayout(); }
349  void setOpacity(float opacity) { m_opacity = stdext::clamp<float>(opacity, 0.0f, 1.0f); }
350  void setRotation(float degrees) { m_rotation = degrees; }
351 
352  int getX() { return m_rect.x(); }
353  int getY() { return m_rect.y(); }
354  Point getPosition() { return m_rect.topLeft(); }
355  int getWidth() { return m_rect.width(); }
356  int getHeight() { return m_rect.height(); }
357  Size getSize() { return m_rect.size(); }
358  Rect getRect() { return m_rect; }
359  Color getColor() { return m_color; }
369  int getIconOffsetX() { return m_iconRect.x(); }
370  int getIconOffsetY() { return m_iconRect.y(); }
372  int getIconWidth() { return m_iconRect.width(); }
373  int getIconHeight() { return m_iconRect.height(); }
374  Size getIconSize() { return m_iconRect.size(); }
386  int getMarginTop() { return m_margin.top; }
387  int getMarginRight() { return m_margin.right; }
388  int getMarginBottom() { return m_margin.bottom; }
389  int getMarginLeft() { return m_margin.left; }
390  int getPaddingTop() { return m_padding.top; }
391  int getPaddingRight() { return m_padding.right; }
393  int getPaddingLeft() { return m_padding.left; }
394  float getOpacity() { return m_opacity; }
395  float getRotation() { return m_rotation; }
396 
397 
398 // image
399 private:
400  void initImage();
401  void parseImageStyle(const OTMLNodePtr& styleNode);
402 
403  void updateImageCache() { m_imageMustRecache = true; }
404  void configureBorderImage() { m_imageBordered = true; updateImageCache(); }
405 
406  CoordsBuffer m_imageCoordsBuffer;
407  Rect m_imageCachedScreenCoords;
408  stdext::boolean<true> m_imageMustRecache;
409  stdext::boolean<false> m_imageBordered;
410 
411 protected:
412  void drawImage(const Rect& screenCoords);
413 
424 
425 public:
426  void setImageSource(const std::string& source);
427  void setImageClip(const Rect& clipRect) { m_imageClipRect = clipRect; updateImageCache(); }
428  void setImageOffsetX(int x) { m_imageRect.setX(x); updateImageCache(); }
429  void setImageOffsetY(int y) { m_imageRect.setY(y); updateImageCache(); }
430  void setImageOffset(const Point& pos) { m_imageRect.move(pos); updateImageCache(); }
431  void setImageWidth(int width) { m_imageRect.setWidth(width); updateImageCache(); }
432  void setImageHeight(int height) { m_imageRect.setHeight(height); updateImageCache(); }
433  void setImageSize(const Size& size) { m_imageRect.resize(size); updateImageCache(); }
434  void setImageRect(const Rect& rect) { m_imageRect = rect; updateImageCache(); }
435  void setImageColor(const Color& color) { m_imageColor = color; updateImageCache(); }
436  void setImageFixedRatio(bool fixedRatio) { m_imageFixedRatio = fixedRatio; updateImageCache(); }
437  void setImageRepeated(bool repeated) { m_imageRepeated = repeated; updateImageCache(); }
438  void setImageSmooth(bool smooth) { m_imageSmooth = smooth; }
439  void setImageAutoResize(bool autoResize) { m_imageAutoResize = autoResize; }
440  void setImageBorderTop(int border) { m_imageBorder.top = border; configureBorderImage(); }
441  void setImageBorderRight(int border) { m_imageBorder.right = border; configureBorderImage(); }
442  void setImageBorderBottom(int border) { m_imageBorder.bottom = border; configureBorderImage(); }
443  void setImageBorderLeft(int border) { m_imageBorder.left = border; configureBorderImage(); }
444  void setImageBorder(int border) { m_imageBorder.set(border); configureBorderImage(); }
445 
447  int getImageOffsetX() { return m_imageRect.x(); }
448  int getImageOffsetY() { return m_imageRect.y(); }
450  int getImageWidth() { return m_imageRect.width(); }
451  int getImageHeight() { return m_imageRect.height(); }
456  bool isImageSmooth() { return m_imageSmooth; }
464 
465 // text related
466 private:
467  void initText();
468  void parseTextStyle(const OTMLNodePtr& styleNode);
469 
470  stdext::boolean<true> m_textMustRecache;
471  CoordsBuffer m_textCoordsBuffer;
472  Rect m_textCachedScreenCoords;
473 
474 protected:
475  virtual void updateText();
476  void drawText(const Rect& screenCoords);
477 
478  virtual void onTextChange(const std::string& text, const std::string& oldText);
479  virtual void onFontChange(const std::string& font);
480 
481  std::string m_text;
482  std::string m_drawText;
490 
491 public:
493  void clearText() { setText(""); }
494 
495  void setText(std::string text, bool dontFireLuaCall = false);
497  void setTextOffset(const Point& offset) { m_textOffset = offset; updateText(); }
498  void setTextWrap(bool textWrap) { m_textWrap = textWrap; updateText(); }
499  void setTextAutoResize(bool textAutoResize) { m_textHorizontalAutoResize = textAutoResize; m_textVerticalAutoResize = textAutoResize; updateText(); }
500  void setTextHorizontalAutoResize(bool textAutoResize) { m_textHorizontalAutoResize = textAutoResize; updateText(); }
501  void setTextVerticalAutoResize(bool textAutoResize) { m_textVerticalAutoResize = textAutoResize; updateText(); }
502  void setTextOnlyUpperCase(bool textOnlyUpperCase) { m_textOnlyUpperCase = textOnlyUpperCase; setText(m_text); }
503  void setFont(const std::string& fontName);
504 
505  std::string getText() { return m_text; }
506  std::string getDrawText() { return m_drawText; }
509  bool getTextWrap() { return m_textWrap; }
510  std::string getFont() { return m_font->getName(); }
512 };
513 
514 #endif
TRect::contains
bool contains(const TPoint< T > &p, bool insideOnly=false) const
Definition: rect.h:141
UIWidget::onFocusChange
virtual void onFocusChange(bool focused, Fw::FocusReason reason)
Definition: uiwidget.cpp:1498
UIWidget::unlock
void unlock()
Definition: uiwidget.cpp:654
UIWidget::setImageOffset
void setImageOffset(const Point &pos)
Definition: uiwidget.h:430
UIWidget::setTextVerticalAutoResize
void setTextVerticalAutoResize(bool textAutoResize)
Definition: uiwidget.h:501
EdgeGroup::right
T right
Definition: uiwidget.h:41
UIWidget::getPaddingRect
Rect getPaddingRect()
Definition: uiwidget.cpp:1054
UIWidget::getOpacity
float getOpacity()
Definition: uiwidget.h:394
UIWidget::setPadding
void setPadding(int padding)
Definition: uiwidget.h:342
UIWidget::setImageOffsetY
void setImageOffsetY(int y)
Definition: uiwidget.h:429
UIWidget::isFixedSize
bool isFixedSize()
Definition: uiwidget.h:245
UIWidget::m_layout
UILayoutPtr m_layout
Definition: uiwidget.h:72
UIWidget::setIconOffset
void setIconOffset(const Point &pos)
Definition: uiwidget.h:318
UIWidget::containsPaddingPoint
bool containsPaddingPoint(const Point &point)
Definition: uiwidget.h:251
UIWidget::getImageHeight
int getImageHeight()
Definition: uiwidget.h:451
Fw::FirstState
@ FirstState
Definition: const.h:276
UIWidget::isActive
bool isActive()
Definition: uiwidget.h:225
BitmapFont::calculateTextRectSize
Size calculateTextRectSize(const std::string &text)
Simulate render and calculate text size.
Definition: bitmapfont.cpp:256
TRect::resize
void resize(const TSize< T > &size)
Definition: rect.h:100
UILayout
Definition: uilayout.h:31
UIWidget::breakAnchors
void breakAnchors()
Definition: uiwidget.cpp:611
Fw::FocusState
@ FocusState
Definition: const.h:270
UIWidget::disable
void disable()
Definition: uiwidget.h:222
UIWidget::getIconSize
Size getIconSize()
Definition: uiwidget.h:374
UIWidget::setPaddingTop
void setPaddingTop(int padding)
Definition: uiwidget.h:345
UIWidget::setImageRepeated
void setImageRepeated(bool repeated)
Definition: uiwidget.h:437
UIWidget::setAutoFocusPolicy
void setAutoFocusPolicy(Fw::AutoFocusPolicy policy)
Definition: uiwidget.cpp:1009
UIWidget::getBackgroundRect
Rect getBackgroundRect()
Definition: uiwidget.h:367
UIWidget
Definition: uiwidget.h:47
UIWidget::setTextOnlyUpperCase
void setTextOnlyUpperCase(bool textOnlyUpperCase)
Definition: uiwidget.h:502
UIWidget::m_iconOffset
Point m_iconOffset
Definition: uiwidget.h:418
UIWidget::fill
void fill(const std::string &hookedWidgetId)
Definition: uiwidget.cpp:597
UIWidget::getImageTextureWidth
int getImageTextureWidth()
Definition: uiwidget.h:462
UIWidget::isPressed
bool isPressed()
Definition: uiwidget.h:230
UIWidget::getImageTextureHeight
int getImageTextureHeight()
Definition: uiwidget.h:463
UIWidget::setY
void setY(int y)
Definition: uiwidget.h:300
Color
Definition: color.h:32
UIWidget::setBackgroundRect
void setBackgroundRect(const Rect &rect)
Definition: uiwidget.h:313
UIWidget::getIconWidth
int getIconWidth()
Definition: uiwidget.h:372
UIWidget::onDragEnter
virtual bool onDragEnter(const Point &mousePos)
Definition: uiwidget.cpp:1520
UIWidget::m_iconRect
Rect m_iconRect
Definition: uiwidget.h:286
UIWidget::setImageClip
void setImageClip(const Rect &clipRect)
Definition: uiwidget.h:427
UIWidget::isEnabled
bool isEnabled()
Definition: uiwidget.h:226
TPoint::y
T y
Definition: point.h:83
UIWidget::focusChild
void focusChild(const UIWidgetPtr &child, Fw::FocusReason reason)
Definition: uiwidget.cpp:253
UIWidget::getChildCount
int getChildCount()
Definition: uiwidget.h:262
UIWidget::isChecked
bool isChecked()
Definition: uiwidget.h:235
UIWidget::m_virtualOffset
Point m_virtualOffset
Definition: uiwidget.h:63
UIWidget::getLayout
UILayoutPtr getLayout()
Definition: uiwidget.h:260
UIWidget::m_imageSmooth
stdext::boolean< false > m_imageSmooth
Definition: uiwidget.h:421
UIWidget::setFocusable
void setFocusable(bool focusable)
Definition: uiwidget.cpp:972
UIWidget::resizeToText
void resizeToText()
Definition: uiwidget.h:492
UIWidget::m_textOffset
Point m_textOffset
Definition: uiwidget.h:484
TRect< int >
TRect::x
T x() const
Definition: rect.h:58
UIWidget::getBackgroundOffset
Point getBackgroundOffset()
Definition: uiwidget.h:363
Fw::ActiveState
@ ActiveState
Definition: const.h:269
Fw::WidgetState
WidgetState
Definition: const.h:266
UIWidget::isChildLocked
bool isChildLocked(const UIWidgetPtr &child)
Definition: uiwidget.cpp:1029
UIWidget::m_textWrap
stdext::boolean< false > m_textWrap
Definition: uiwidget.h:485
UIWidget::setImageColor
void setImageColor(const Color &color)
Definition: uiwidget.h:435
UIWidget::setStyle
void setStyle(const std::string &styleName)
Definition: uiwidget.cpp:906
UIWidget::onStyleApply
virtual void onStyleApply(const std::string &styleName, const OTMLNodePtr &styleNode)
Definition: uiwidget.cpp:1461
UIWidget::getImageOffsetY
int getImageOffsetY()
Definition: uiwidget.h:448
Fw::DraggingState
@ DraggingState
Definition: const.h:280
UIWidget::centerIn
void centerIn(const std::string &hookedWidgetId)
Definition: uiwidget.cpp:585
UIWidget::m_autoRepeatDelay
int m_autoRepeatDelay
Definition: uiwidget.h:295
UIWidget::getMarginBottom
int getMarginBottom()
Definition: uiwidget.h:388
UIWidget::onDrop
virtual bool onDrop(UIWidgetPtr draggedWidget, const Point &mousePos)
Definition: uiwidget.cpp:1535
UIWidget::ungrabKeyboard
void ungrabKeyboard()
Definition: uiwidget.cpp:729
UIWidget::setIconRect
void setIconRect(const Rect &rect)
Definition: uiwidget.h:322
UIWidget::hide
void hide()
Definition: uiwidget.h:220
UIWidget::m_textAlign
Fw::AlignmentFlag m_textAlign
Definition: uiwidget.h:483
UIWidget::setImageRect
void setImageRect(const Rect &rect)
Definition: uiwidget.h:434
UIWidget::isImageSmooth
bool isImageSmooth()
Definition: uiwidget.h:456
UIWidget::setTextAlign
void setTextAlign(Fw::AlignmentFlag align)
Definition: uiwidget.h:496
UIWidget::propagateOnMouseMove
bool propagateOnMouseMove(const Point &mousePos, const Point &mouseMoved, UIWidgetList &widgetList)
Definition: uiwidget.cpp:1713
UIWidget::propagateOnKeyDown
bool propagateOnKeyDown(uchar keyCode, int keyboardModifiers)
Definition: uiwidget.cpp:1622
UIWidget::setMarginRight
void setMarginRight(int margin)
Definition: uiwidget.h:339
EdgeGroup::top
T top
Definition: uiwidget.h:40
UIWidget::m_borderWidth
EdgeGroup< int > m_borderWidth
Definition: uiwidget.h:290
UIWidget::recursiveGetChildByPos
UIWidgetPtr recursiveGetChildByPos(const Point &childPos, bool wantsPhantom)
Definition: uiwidget.cpp:1173
UIWidget::containsMarginPoint
bool containsMarginPoint(const Point &point)
Definition: uiwidget.h:250
UIWidget::getMarginRight
int getMarginRight()
Definition: uiwidget.h:387
UIWidget::getImageClip
Rect getImageClip()
Definition: uiwidget.h:446
UIWidget::getId
std::string getId()
Definition: uiwidget.h:254
Fw::AnchorEdge
AnchorEdge
Definition: const.h:211
UIWidget::m_iconClipRect
Rect m_iconClipRect
Definition: uiwidget.h:287
UIWidget::onHoverChange
virtual void onHoverChange(bool hovered)
Definition: uiwidget.cpp:1508
UIWidget::setRotation
void setRotation(float degrees)
Definition: uiwidget.h:350
coordsbuffer.h
UIWidget::drawSelf
virtual void drawSelf(Fw::DrawPane drawPane)
Definition: uiwidget.cpp:88
UIWidget::m_autoFocusPolicy
Fw::AutoFocusPolicy m_autoFocusPolicy
Definition: uiwidget.h:80
UIWidget::getAnchoredLayout
UIAnchorLayoutPtr getAnchoredLayout()
Definition: uiwidget.cpp:1093
UIWidget::destroy
void destroy()
Definition: uiwidget.cpp:774
UIWidget::propagateOnKeyPress
bool propagateOnKeyPress(uchar keyCode, int keyboardModifiers, int autoRepeatTicks)
Definition: uiwidget.cpp:1644
UIWidget::isMiddle
bool isMiddle()
Definition: uiwidget.h:232
UIWidget::setImageWidth
void setImageWidth(int width)
Definition: uiwidget.h:431
UIWidget::unlockChild
void unlockChild(const UIWidgetPtr &child)
Definition: uiwidget.cpp:470
UIWidget::isAnchored
bool isAnchored()
Definition: uiwidget.cpp:1021
UIWidget::getBackgroundOffsetY
int getBackgroundOffsetY()
Definition: uiwidget.h:362
UIWidget::getHeight
int getHeight()
Definition: uiwidget.h:356
UIWidget::isImageAutoResize
bool isImageAutoResize()
Definition: uiwidget.h:457
UIWidget::getPaddingLeft
int getPaddingLeft()
Definition: uiwidget.h:393
UIWidget::onMouseWheel
virtual bool onMouseWheel(const Point &mousePos, Fw::MouseWheelDirection direction)
Definition: uiwidget.cpp:1585
UIWidget::addChild
void addChild(const UIWidgetPtr &child)
Definition: uiwidget.cpp:138
UIWidget::m_imageBorder
EdgeGroup< int > m_imageBorder
Definition: uiwidget.h:423
UIWidget::isPhantom
bool isPhantom()
Definition: uiwidget.h:243
UIWidget::setImageHeight
void setImageHeight(int height)
Definition: uiwidget.h:432
UIWidget::setIconColor
void setIconColor(const Color &color)
Definition: uiwidget.h:315
UIWidget::recursiveGetChildrenByMarginPos
UIWidgetList recursiveGetChildrenByMarginPos(const Point &childPos)
Definition: uiwidget.cpp:1221
UIWidget::containsPoint
bool containsPoint(const Point &point)
Definition: uiwidget.h:252
UIWidget::mergeStyle
void mergeStyle(const OTMLNodePtr &styleNode)
Definition: uiwidget.cpp:515
TRect::setY
void setY(T y)
Definition: rect.h:80
UIWidget::m_imageTexture
TexturePtr m_imageTexture
Definition: uiwidget.h:414
UIWidget::getBorderRightWidth
int getBorderRightWidth()
Definition: uiwidget.h:383
UIWidget::resize
void resize(int width, int height)
Definition: uiwidget.h:217
UIWidget::m_focusable
stdext::boolean< true > m_focusable
Definition: uiwidget.h:66
Fw::HoverState
@ HoverState
Definition: const.h:271
UIWidget::getImageBorderLeft
int getImageBorderLeft()
Definition: uiwidget.h:461
UIWidget::getBorderLeftWidth
int getBorderLeftWidth()
Definition: uiwidget.h:385
UIWidget::setPosition
void setPosition(const Point &pos)
Definition: uiwidget.h:304
UIWidget::setImageAutoResize
void setImageAutoResize(bool autoResize)
Definition: uiwidget.h:439
UIWidget::addAnchor
void addAnchor(Fw::AnchorEdge anchoredEdge, const std::string &hookedWidgetId, Fw::AnchorEdge hookedEdge)
Definition: uiwidget.cpp:569
UIWidget::getRotation
float getRotation()
Definition: uiwidget.h:395
Texture::getWidth
int getWidth()
Definition: texture.h:48
UIWidget::getLastChild
UIWidgetPtr getLastChild()
Definition: uiwidget.h:259
UIWidget::getIconOffset
Point getIconOffset()
Definition: uiwidget.h:371
UIWidget::setIcon
void setIcon(const std::string &iconFile)
Definition: uiwidgetbasestyle.cpp:402
UIWidget::setBackgroundOffsetX
void setBackgroundOffsetX(int x)
Definition: uiwidget.h:307
stdext::boolean< true >
UIWidget::m_textVerticalAutoResize
stdext::boolean< false > m_textVerticalAutoResize
Definition: uiwidget.h:486
UIWidget::bindRectToParent
void bindRectToParent()
Definition: uiwidget.cpp:735
UIWidget::m_text
std::string m_text
Definition: uiwidget.h:481
TSize::width
int width() const
Definition: size.h:43
UIWidget::m_lastClickPosition
Point m_lastClickPosition
Definition: uiwidget.h:296
UIWidget::m_rect
Rect m_rect
Definition: uiwidget.h:62
UIWidget::drawBorder
void drawBorder(const Rect &screenCoords)
Definition: uiwidgetbasestyle.cpp:348
UIWidget::setPaddingHorizontal
void setPaddingHorizontal(int padding)
Definition: uiwidget.h:343
UIWidget::focus
void focus()
Definition: uiwidget.cpp:663
UIWidget::setTextHorizontalAutoResize
void setTextHorizontalAutoResize(bool textAutoResize)
Definition: uiwidget.h:500
Fw::FocusReason
FocusReason
Definition: const.h:221
UIWidget::setBorderWidthRight
void setBorderWidthRight(int width)
Definition: uiwidget.h:327
UIWidget::setBackgroundOffsetY
void setBackgroundOffsetY(int y)
Definition: uiwidget.h:308
UIWidget::getX
int getX()
Definition: uiwidget.h:352
Texture::getHeight
int getHeight()
Definition: texture.h:49
UIWidget::setColor
void setColor(const Color &color)
Definition: uiwidget.h:305
UIWidget::getTextAlign
Fw::AlignmentFlag getTextAlign()
Definition: uiwidget.h:507
luaobject.h
UIWidget::m_lockedChildren
UIWidgetList m_lockedChildren
Definition: uiwidget.h:75
UIWidget::getChildByIndex
UIWidgetPtr getChildByIndex(int index)
Definition: uiwidget.cpp:1152
UIWidget::setBackgroundColor
void setBackgroundColor(const Color &color)
Definition: uiwidget.h:306
UIWidget::getRootParent
UIWidgetPtr getRootParent()
Definition: uiwidget.cpp:1105
UIWidget::show
void show()
Definition: uiwidget.h:221
UIWidget::setIconHeight
void setIconHeight(int height)
Definition: uiwidget.h:320
UIWidget::setIconAlign
void setIconAlign(Fw::AlignmentFlag align)
Definition: uiwidget.h:324
UIWidget::getImageRect
Rect getImageRect()
Definition: uiwidget.h:453
UIWidget::setIconOffsetX
void setIconOffsetX(int x)
Definition: uiwidget.h:316
UIWidget::onGeometryChange
virtual void onGeometryChange(const Rect &oldRect, const Rect &newRect)
Definition: uiwidget.cpp:1477
UIWidget::getLastFocusReason
Fw::FocusReason getLastFocusReason()
Definition: uiwidget.h:263
UIWidget::m_iconAlign
Fw::AlignmentFlag m_iconAlign
Definition: uiwidget.h:288
UIWidget::getMarginRect
Rect getMarginRect()
Definition: uiwidget.cpp:1061
UIWidget::getImageColor
Color getImageColor()
Definition: uiwidget.h:454
UIWidget::getChildBefore
UIWidgetPtr getChildBefore(const UIWidgetPtr &relativeChild)
Definition: uiwidget.cpp:1121
Fw::MiddleState
@ MiddleState
Definition: const.h:277
UIWidget::focusPreviousChild
void focusPreviousChild(Fw::FocusReason reason, bool rotate=false)
Definition: uiwidget.cpp:331
UIWidget::getAutoFocusPolicy
Fw::AutoFocusPolicy getAutoFocusPolicy()
Definition: uiwidget.h:264
UIWidget::setPaddingBottom
void setPaddingBottom(int padding)
Definition: uiwidget.h:347
UIWidget::m_font
BitmapFontPtr m_font
Definition: uiwidget.h:489
UIWidget::ungrabMouse
void ungrabMouse()
Definition: uiwidget.cpp:715
UIWidget::getMarginLeft
int getMarginLeft()
Definition: uiwidget.h:389
UIWidget::m_opacity
float m_opacity
Definition: uiwidget.h:293
UIWidget::m_imageColor
Color m_imageColor
Definition: uiwidget.h:417
UIWidget::m_textOnlyUpperCase
stdext::boolean< false > m_textOnlyUpperCase
Definition: uiwidget.h:488
UIWidget::getBorderBottomColor
Color getBorderBottomColor()
Definition: uiwidget.h:380
EdgeGroup::EdgeGroup
EdgeGroup()
Definition: uiwidget.h:38
UIWidget::getPosition
Point getPosition()
Definition: uiwidget.h:354
UIWidget::isFirst
bool isFirst()
Definition: uiwidget.h:231
UIWidget::setBorderWidth
void setBorderWidth(int width)
Definition: uiwidget.h:325
UIWidget::setPaddingVertical
void setPaddingVertical(int padding)
Definition: uiwidget.h:344
TRect::topLeft
TPoint< T > topLeft() const
Definition: rect.h:60
UIWidget::getPaddingBottom
int getPaddingBottom()
Definition: uiwidget.h:392
UIWidget::onDragMove
virtual bool onDragMove(const Point &mousePos, const Point &mouseMoved)
Definition: uiwidget.cpp:1530
UIWidget::setImageSmooth
void setImageSmooth(bool smooth)
Definition: uiwidget.h:438
UIWidget::isHidden
bool isHidden()
Definition: uiwidget.h:239
UIWidget::isImageFixedRatio
bool isImageFixedRatio()
Definition: uiwidget.h:455
UIWidget::getChildByPos
UIWidgetPtr getChildByPos(const Point &childPos)
Definition: uiwidget.cpp:1138
UIWidget::updateParentLayout
void updateParentLayout()
Definition: uiwidget.cpp:620
UIWidget::m_id
std::string m_id
Definition: uiwidget.h:61
UIWidget::m_clipping
stdext::boolean< false > m_clipping
Definition: uiwidget.h:71
UIWidget::clearText
void clearText()
Definition: uiwidget.h:493
OTMLNode::tag
std::string tag()
Definition: otmlnode.h:36
TRect::setX
void setX(T x)
Definition: rect.h:79
UIWidget::m_padding
EdgeGroup< int > m_padding
Definition: uiwidget.h:292
UIWidget::getBackgroundHeight
int getBackgroundHeight()
Definition: uiwidget.h:365
UIWidget::isOn
bool isOn()
Definition: uiwidget.h:236
UIWidget::setImageOffsetX
void setImageOffsetX(int x)
Definition: uiwidget.h:428
UIManager
Definition: uimanager.h:32
UIWidget::getIconAlign
Fw::AlignmentFlag getIconAlign()
Definition: uiwidget.h:377
UIWidget::onTextChange
virtual void onTextChange(const std::string &text, const std::string &oldText)
Definition: uiwidgettext.cpp:106
UIWidget::onMouseRelease
virtual bool onMouseRelease(const Point &mousePos, Fw::MouseButton button)
Definition: uiwidget.cpp:1575
UIWidget::m_imageAutoResize
stdext::boolean< false > m_imageAutoResize
Definition: uiwidget.h:422
UIWidget::getBackgroundSize
Size getBackgroundSize()
Definition: uiwidget.h:366
UIWidget::getBackgroundOffsetX
int getBackgroundOffsetX()
Definition: uiwidget.h:361
UIWidget::updateText
virtual void updateText()
Definition: uiwidgettext.cpp:37
UIWidget::getFirstChild
UIWidgetPtr getFirstChild()
Definition: uiwidget.h:258
UIWidget::setImageBorder
void setImageBorder(int border)
Definition: uiwidget.h:444
UIWidget::getMarginTop
int getMarginTop()
Definition: uiwidget.h:386
UIWidget::m_focusedChild
UIWidgetPtr m_focusedChild
Definition: uiwidget.h:76
timer.h
UIWidget::setIconClip
void setIconClip(const Rect &rect)
Definition: uiwidget.h:323
UIWidget::m_imageFixedRatio
stdext::boolean< false > m_imageFixedRatio
Definition: uiwidget.h:419
UIWidget::onFontChange
virtual void onFontChange(const std::string &font)
Definition: uiwidgettext.cpp:112
UIWidget::getIconRect
Rect getIconRect()
Definition: uiwidget.h:375
UIWidget::setBorderColor
void setBorderColor(const Color &color)
Definition: uiwidget.h:330
UIWidget::getLastClickPosition
Point getLastClickPosition()
Definition: uiwidget.h:268
UIWidget::getChildrenRect
Rect getChildrenRect()
Definition: uiwidget.cpp:1068
UIWidget::lockChild
void lockChild(const UIWidgetPtr &child)
Definition: uiwidget.cpp:438
UIWidget::setTextAutoResize
void setTextAutoResize(bool textAutoResize)
Definition: uiwidget.h:499
UIWidget::setChecked
void setChecked(bool checked)
Definition: uiwidget.cpp:966
UIWidget::getChildById
UIWidgetPtr getChildById(const std::string &childId)
Definition: uiwidget.cpp:1129
UIWidget::focusNextChild
void focusNextChild(Fw::FocusReason reason, bool rotate=false)
Definition: uiwidget.cpp:288
UIWidget::getTextOffset
Point getTextOffset()
Definition: uiwidget.h:508
EdgeGroup::set
void set(T value)
Definition: uiwidget.h:39
UIWidget::setOn
void setOn(bool on)
Definition: uiwidget.cpp:961
UIWidget::setDraggable
void setDraggable(bool draggable)
Definition: uiwidget.cpp:993
UIWidget::isFocusable
bool isFocusable()
Definition: uiwidget.h:242
Fw::OnState
@ OnState
Definition: const.h:275
UIWidget::setBackgroundOffset
void setBackgroundOffset(const Point &pos)
Definition: uiwidget.h:309
UIWidget::m_lastFocusReason
Fw::FocusReason m_lastFocusReason
Definition: uiwidget.h:79
UIWidget::recursiveGetChildren
UIWidgetList recursiveGetChildren()
Definition: uiwidget.cpp:1191
TRect::y
T y() const
Definition: rect.h:59
UIWidget::setState
bool setState(Fw::WidgetState state, bool on)
Definition: uiwidget.cpp:1249
UIWidget::setBorderWidthTop
void setBorderWidthTop(int width)
Definition: uiwidget.h:326
UIWidget::m_imageRepeated
stdext::boolean< false > m_imageRepeated
Definition: uiwidget.h:420
UIWidget::drawChildren
virtual void drawChildren(const Rect &visibleRect, Fw::DrawPane drawPane)
Definition: uiwidget.cpp:106
UIWidget::setMarginVertical
void setMarginVertical(int margin)
Definition: uiwidget.h:337
UIWidget::backwardsGetWidgetById
UIWidgetPtr backwardsGetWidgetById(const std::string &id)
Definition: uiwidget.cpp:1239
UIWidget::getVirtualOffset
Point getVirtualOffset()
Definition: uiwidget.h:266
UIWidget::getImageBorderTop
int getImageBorderTop()
Definition: uiwidget.h:458
UIWidget::setText
void setText(std::string text, bool dontFireLuaCall=false)
Definition: uiwidgettext.cpp:117
UIWidget::m_style
OTMLNodePtr m_style
Definition: uiwidget.h:77
UIWidget::getImageWidth
int getImageWidth()
Definition: uiwidget.h:450
UIWidget::propagateOnKeyUp
bool propagateOnKeyUp(uchar keyCode, int keyboardModifiers)
Definition: uiwidget.cpp:1669
UIWidget::setHeight
void setHeight(int height)
Definition: uiwidget.h:302
UIWidget::getBorderRightColor
Color getBorderRightColor()
Definition: uiwidget.h:379
UIWidget::setTextWrap
void setTextWrap(bool textWrap)
Definition: uiwidget.h:498
UIWidget::getParent
UIWidgetPtr getParent()
Definition: uiwidget.h:255
UIWidget::getPaddingRight
int getPaddingRight()
Definition: uiwidget.h:391
Size
TSize< int > Size
Definition: size.h:107
TPoint::x
T x
Definition: point.h:83
UIWidget::setBorderColorRight
void setBorderColorRight(const Color &color)
Definition: uiwidget.h:332
UIWidget::getColor
Color getColor()
Definition: uiwidget.h:359
UIWidget::onMousePress
virtual bool onMousePress(const Point &mousePos, Fw::MouseButton button)
Definition: uiwidget.cpp:1560
UIWidget::m_imageClipRect
Rect m_imageClipRect
Definition: uiwidget.h:415
UIWidget::onDoubleClick
virtual bool onDoubleClick(const Point &mousePos)
Definition: uiwidget.cpp:1595
UIWidget::onClick
virtual bool onClick(const Point &mousePos)
Definition: uiwidget.cpp:1590
UIWidget::moveChildToIndex
void moveChildToIndex(const UIWidgetPtr &child, int index)
Definition: uiwidget.cpp:413
UIWidget::setParent
void setParent(const UIWidgetPtr &parent)
Definition: uiwidget.cpp:817
UIWidget::m_draggable
stdext::boolean< false > m_draggable
Definition: uiwidget.h:69
UIWidget::getFont
std::string getFont()
Definition: uiwidget.h:510
UIWidget::getIconOffsetX
int getIconOffsetX()
Definition: uiwidget.h:369
UIWidget::m_backgroundRect
Rect m_backgroundRect
Definition: uiwidget.h:283
UIWidget::setBorderWidthBottom
void setBorderWidthBottom(int width)
Definition: uiwidget.h:328
UIWidget::onChildFocusChange
virtual void onChildFocusChange(const UIWidgetPtr &focusedChild, const UIWidgetPtr &unfocusedChild, Fw::FocusReason reason)
Definition: uiwidget.cpp:1503
UIWidget::lowerChild
void lowerChild(UIWidgetPtr child)
Definition: uiwidget.cpp:374
Fw::AlignmentFlag
AlignmentFlag
Definition: const.h:192
UIWidget::propagateOnKeyText
bool propagateOnKeyText(const std::string &keyText)
Definition: uiwidget.cpp:1600
UIWidget::updateLayout
void updateLayout()
Definition: uiwidget.cpp:631
UIWidget::setImageBorderBottom
void setImageBorderBottom(int border)
Definition: uiwidget.h:442
UIWidget::setClipping
void setClipping(bool clipping)
Definition: uiwidget.h:131
UIWidget::getWidth
int getWidth()
Definition: uiwidget.h:355
UIWidget::setPhantom
void setPhantom(bool phantom)
Definition: uiwidget.cpp:988
Fw::PressedState
@ PressedState
Definition: const.h:272
UIWidget::isDraggable
bool isDraggable()
Definition: uiwidget.h:244
UIWidget::getSize
Size getSize()
Definition: uiwidget.h:357
UIWidget::setWidth
void setWidth(int width)
Definition: uiwidget.h:301
UIWidget::getDrawText
std::string getDrawText()
Definition: uiwidget.h:506
UIWidget::setBorderColorBottom
void setBorderColorBottom(const Color &color)
Definition: uiwidget.h:333
UIWidget::drawIcon
void drawIcon(const Rect &screenCoords)
Definition: uiwidgetbasestyle.cpp:380
UIWidget::isDisabled
bool isDisabled()
Definition: uiwidget.h:227
UIWidget::getFocusedChild
UIWidgetPtr getFocusedChild()
Definition: uiwidget.h:256
Rect
TRect< int > Rect
Definition: rect.h:319
UIWidget::isExplicitlyEnabled
bool isExplicitlyEnabled()
Definition: uiwidget.h:240
UIWidget::m_margin
EdgeGroup< int > m_margin
Definition: uiwidget.h:291
UIWidget::getIconClip
Rect getIconClip()
Definition: uiwidget.h:376
TRect::move
void move(T x, T y)
Definition: rect.h:102
UIWidget::onLayoutUpdate
virtual void onLayoutUpdate()
Definition: uiwidget.cpp:1493
UIWidget::getChildren
UIWidgetList getChildren()
Definition: uiwidget.h:257
UIWidget::setIconWidth
void setIconWidth(int width)
Definition: uiwidget.h:319
UIWidget::setMarginTop
void setMarginTop(int margin)
Definition: uiwidget.h:338
Fw::AlternateState
@ AlternateState
Definition: const.h:279
UIWidget::setStyleFromNode
void setStyleFromNode(const OTMLNodePtr &styleNode)
Definition: uiwidget.cpp:919
Fw::DisabledState
@ DisabledState
Definition: const.h:273
UIWidget::setIconOffsetY
void setIconOffsetY(int y)
Definition: uiwidget.h:317
UIWidget::onKeyDown
virtual bool onKeyDown(uchar keyCode, int keyboardModifiers)
Definition: uiwidget.cpp:1545
UIWidget::setImageFixedRatio
void setImageFixedRatio(bool fixedRatio)
Definition: uiwidget.h:436
UIWidget::m_children
UIWidgetList m_children
Definition: uiwidget.h:74
UIWidget::destroyChildren
void destroyChildren()
Definition: uiwidget.cpp:789
UIWidget::drawImage
void drawImage(const Rect &screenCoords)
Definition: uiwidgetimage.cpp:78
UIWidget::setImageSize
void setImageSize(const Size &size)
Definition: uiwidget.h:433
UIWidget::m_textHorizontalAutoResize
stdext::boolean< false > m_textHorizontalAutoResize
Definition: uiwidget.h:487
UIWidget::m_visible
stdext::boolean< true > m_visible
Definition: uiwidget.h:65
UIWidget::m_rotation
float m_rotation
Definition: uiwidget.h:294
UIWidget::m_phantom
stdext::boolean< false > m_phantom
Definition: uiwidget.h:68
UIWidget::setX
void setX(int x)
Definition: uiwidget.h:299
UIWidget::move
void move(int x, int y)
Definition: uiwidget.h:218
TSize::height
int height() const
Definition: size.h:44
UIWidget::grabKeyboard
void grabKeyboard()
Definition: uiwidget.cpp:721
uchar
unsigned char uchar
Definition: types.h:29
UIWidget::getBorderTopWidth
int getBorderTopWidth()
Definition: uiwidget.h:382
UIWidget::hasChildren
bool hasChildren()
Definition: uiwidget.h:249
BitmapFont::getName
std::string getName()
Definition: bitmapfont.h:58
UIWidget::isHovered
bool isHovered()
Definition: uiwidget.h:229
UIWidget::m_backgroundColor
Color m_backgroundColor
Definition: uiwidget.h:282
UIWidget::setOpacity
void setOpacity(float opacity)
Definition: uiwidget.h:349
UIWidget::setAutoRepeatDelay
void setAutoRepeatDelay(int delay)
Definition: uiwidget.h:134
Fw::MouseWheelDirection
MouseWheelDirection
Definition: const.h:253
UIWidget::m_imageRect
Rect m_imageRect
Definition: uiwidget.h:416
UIWidget::~UIWidget
virtual ~UIWidget()
Definition: uiwidget.cpp:49
UIWidget::setBorderWidthLeft
void setBorderWidthLeft(int width)
Definition: uiwidget.h:329
UIWidget::isDragging
bool isDragging()
Definition: uiwidget.h:237
declarations.h
UIWidget::lower
void lower()
Definition: uiwidget.cpp:687
UIWidget::setBackgroundWidth
void setBackgroundWidth(int width)
Definition: uiwidget.h:310
TRect::setHeight
void setHeight(T height)
Definition: rect.h:86
otmlnode.h
Fw::DrawPane
DrawPane
Definition: const.h:285
UIWidget::m_icon
TexturePtr m_icon
Definition: uiwidget.h:284
UIWidget::recursiveFocus
void recursiveFocus(Fw::FocusReason reason)
Definition: uiwidget.cpp:675
UIWidget::m_borderColor
EdgeGroup< Color > m_borderColor
Definition: uiwidget.h:289
stdext::shared_object_ptr< UILayout >
CoordsBuffer
Definition: coordsbuffer.h:29
bitmapfont.h
UIWidget::draw
virtual void draw(const Rect &visibleRect, Fw::DrawPane drawPane)
Definition: uiwidget.cpp:58
UIWidget::setFixedSize
void setFixedSize(bool fixed)
Definition: uiwidget.cpp:998
uilayout.h
EdgeGroup
Definition: uiwidget.h:37
UIWidget::removeAnchor
void removeAnchor(Fw::AnchorEdge anchoredEdge)
Definition: uiwidget.cpp:580
UIWidget::getIconHeight
int getIconHeight()
Definition: uiwidget.h:373
UIWidget::setLayout
void setLayout(const UILayoutPtr &layout)
Definition: uiwidget.cpp:843
UIWidget::hasState
bool hasState(Fw::WidgetState state)
Definition: uiwidget.cpp:1267
UIWidget::isExplicitlyVisible
bool isExplicitlyVisible()
Definition: uiwidget.h:241
UIWidget::m_enabled
stdext::boolean< true > m_enabled
Definition: uiwidget.h:64
UIWidget::UIWidget
UIWidget()
Definition: uiwidget.cpp:36
UIWidget::setMarginLeft
void setMarginLeft(int margin)
Definition: uiwidget.h:341
UIWidget::getBorderLeftColor
Color getBorderLeftColor()
Definition: uiwidget.h:381
UIWidget::setLastFocusReason
void setLastFocusReason(Fw::FocusReason reason)
Definition: uiwidget.cpp:1004
UIWidget::removeChild
void removeChild(UIWidgetPtr child)
Definition: uiwidget.cpp:217
UIWidget::setEnabled
void setEnabled(bool enabled)
Definition: uiwidget.cpp:926
UIWidget::setVisible
void setVisible(bool visible)
Definition: uiwidget.cpp:936
UIWidget::setSize
void setSize(const Size &size)
Definition: uiwidget.h:303
TRect::height
T height() const
Definition: rect.h:70
UIWidget::getImageBorderRight
int getImageBorderRight()
Definition: uiwidget.h:459
UIWidget::isAlternate
bool isAlternate()
Definition: uiwidget.h:234
UIWidget::getImageBorderBottom
int getImageBorderBottom()
Definition: uiwidget.h:460
UIWidget::setImageSource
void setImageSource(const std::string &source)
Definition: uiwidgetimage.cpp:178
UIWidget::onKeyText
virtual bool onKeyText(const std::string &keyText)
Definition: uiwidget.cpp:1540
Timer
Definition: timer.h:28
UIWidget::setPaddingRight
void setPaddingRight(int padding)
Definition: uiwidget.h:346
UIWidget::onMouseMove
virtual bool onMouseMove(const Point &mousePos, const Point &mouseMoved)
Definition: uiwidget.cpp:1580
UIWidget::m_destroyed
stdext::boolean< false > m_destroyed
Definition: uiwidget.h:70
UIWidget::setVirtualOffset
void setVirtualOffset(const Point &offset)
Definition: uiwidget.cpp:1014
UIWidget::m_iconColor
Color m_iconColor
Definition: uiwidget.h:285
UIWidget::getChildAfter
UIWidgetPtr getChildAfter(const UIWidgetPtr &relativeChild)
Definition: uiwidget.cpp:1113
UIWidget::setPaddingLeft
void setPaddingLeft(int padding)
Definition: uiwidget.h:348
UIWidget::isDestroyed
bool isDestroyed()
Definition: uiwidget.h:247
UIWidget::getIconOffsetY
int getIconOffsetY()
Definition: uiwidget.h:370
UIWidget::getStyle
OTMLNodePtr getStyle()
Definition: uiwidget.h:261
UIWidget::enable
void enable()
Definition: uiwidget.h:223
UIWidget::recursiveGetChildrenByPos
UIWidgetList recursiveGetChildrenByPos(const Point &childPos)
Definition: uiwidget.cpp:1203
UIWidget::getBackgroundColor
Color getBackgroundColor()
Definition: uiwidget.h:360
UIWidget::applyStyle
void applyStyle(const OTMLNodePtr &styleNode)
Definition: uiwidget.cpp:526
Fw::CheckedState
@ CheckedState
Definition: const.h:274
UIWidget::getAutoRepeatDelay
int getAutoRepeatDelay()
Definition: uiwidget.h:265
UIWidget::getImageOffsetX
int getImageOffsetX()
Definition: uiwidget.h:447
Fw::HiddenState
@ HiddenState
Definition: const.h:281
UIWidget::setMarginHorizontal
void setMarginHorizontal(int margin)
Definition: uiwidget.h:336
UIWidget::getImageSize
Size getImageSize()
Definition: uiwidget.h:452
UIWidget::getRect
Rect getRect()
Definition: uiwidget.h:358
UIWidget::getY
int getY()
Definition: uiwidget.h:353
UIWidget::setImageBorderLeft
void setImageBorderLeft(int border)
Definition: uiwidget.h:443
UIWidget::getTextSize
Size getTextSize()
Definition: uiwidget.h:511
UIWidget::getBackgroundWidth
int getBackgroundWidth()
Definition: uiwidget.h:364
TPoint< int >
TRect::size
TSize< T > size() const
Definition: rect.h:71
UIWidget::onDragLeave
virtual bool onDragLeave(UIWidgetPtr droppedWidget, const Point &mousePos)
Definition: uiwidget.cpp:1525
UIWidget::isClipping
bool isClipping()
Definition: uiwidget.h:246
EdgeGroup::bottom
T bottom
Definition: uiwidget.h:42
UIWidget::setFont
void setFont(const std::string &fontName)
Definition: uiwidgettext.cpp:136
LuaObject
LuaObject, all script-able classes have it as base.
Definition: luaobject.h:30
TRect::setWidth
void setWidth(T width)
Definition: rect.h:85
EdgeGroup::left
T left
Definition: uiwidget.h:43
UIWidget::m_drawText
std::string m_drawText
Definition: uiwidget.h:482
UIWidget::setBackgroundHeight
void setBackgroundHeight(int height)
Definition: uiwidget.h:311
UIWidget::onKeyUp
virtual bool onKeyUp(uchar keyCode, int keyboardModifiers)
Definition: uiwidget.cpp:1555
UIWidget::getText
std::string getText()
Definition: uiwidget.h:505
UIWidget::raiseChild
void raiseChild(UIWidgetPtr child)
Definition: uiwidget.cpp:394
UIWidget::setId
void setId(const std::string &id)
Definition: uiwidget.cpp:809
UIWidget::insertChild
void insertChild(int index, const UIWidgetPtr &child)
Definition: uiwidget.cpp:179
TRect::width
T width() const
Definition: rect.h:69
UIWidget::lock
void lock()
Definition: uiwidget.cpp:645
UIWidget::onKeyPress
virtual bool onKeyPress(uchar keyCode, int keyboardModifiers, int autoRepeatTicks)
Definition: uiwidget.cpp:1550
UIWidget::setImageBorderTop
void setImageBorderTop(int border)
Definition: uiwidget.h:440
UIWidget::drawText
void drawText(const Rect &screenCoords)
Definition: uiwidgettext.cpp:83
UIWidget::getPaddingTop
int getPaddingTop()
Definition: uiwidget.h:390
Fw::AutoFocusPolicy
AutoFocusPolicy
Definition: const.h:228
UIWidget::isFocused
bool isFocused()
Definition: uiwidget.h:228
TSize< int >
UIWidget::rotate
void rotate(float degrees)
Definition: uiwidget.h:219
UIWidget::getImageOffset
Point getImageOffset()
Definition: uiwidget.h:449
UIWidget::m_clickTimer
Timer m_clickTimer
Definition: uiwidget.h:78
UIWidget::grabMouse
void grabMouse()
Definition: uiwidget.cpp:707
UIWidgetList
std::deque< UIWidgetPtr > UIWidgetList
Definition: declarations.h:53
UIWidget::setMargin
void setMargin(int margin)
Definition: uiwidget.h:335
UIWidget::recursiveGetChildById
UIWidgetPtr recursiveGetChildById(const std::string &id)
Definition: uiwidget.cpp:1160
UIWidget::getBorderTopColor
Color getBorderTopColor()
Definition: uiwidget.h:378
UIWidget::getChildIndex
int getChildIndex(const UIWidgetPtr &child)
Definition: uiwidget.cpp:1043
UIWidget::setTextOffset
void setTextOffset(const Point &offset)
Definition: uiwidget.h:497
UIWidget::setMarginBottom
void setMarginBottom(int margin)
Definition: uiwidget.h:340
UIWidget::setBackgroundSize
void setBackgroundSize(const Size &size)
Definition: uiwidget.h:312
UIWidget::isLast
bool isLast()
Definition: uiwidget.h:233
Fw::LastState
@ LastState
Definition: const.h:278
UIWidget::setRect
bool setRect(const Rect &rect)
Definition: uiwidget.cpp:870
Fw::MouseButton
MouseButton
Definition: const.h:246
UIWidget::setBorderColorTop
void setBorderColorTop(const Color &color)
Definition: uiwidget.h:331
UIWidget::setBorderColorLeft
void setBorderColorLeft(const Color &color)
Definition: uiwidget.h:334
UIWidget::m_parent
UIWidgetPtr m_parent
Definition: uiwidget.h:73
UIWidget::setImageBorderRight
void setImageBorderRight(int border)
Definition: uiwidget.h:441
UIWidget::setIconSize
void setIconSize(const Size &size)
Definition: uiwidget.h:321
UIWidget::getBorderBottomWidth
int getBorderBottomWidth()
Definition: uiwidget.h:384
UIWidget::getIconColor
Color getIconColor()
Definition: uiwidget.h:368
UIWidget::hasChild
bool hasChild(const UIWidgetPtr &child)
Definition: uiwidget.cpp:1035
UIWidget::propagateOnMouseEvent
bool propagateOnMouseEvent(const Point &mousePos, UIWidgetList &widgetList)
Definition: uiwidget.cpp:1691
UIWidget::drawBackground
void drawBackground(const Rect &screenCoords)
Definition: uiwidgetbasestyle.cpp:336
UIWidget::onVisibilityChange
virtual void onVisibilityChange(bool visible)
Definition: uiwidget.cpp:1513
UIWidget::isVisible
bool isVisible()
Definition: uiwidget.h:238
UIWidget::getStyleName
std::string getStyleName()
Definition: uiwidget.h:267
UIWidget::m_color
Color m_color
Definition: uiwidget.h:281
UIWidget::getTextWrap
bool getTextWrap()
Definition: uiwidget.h:509
UIWidget::m_fixedSize
stdext::boolean< false > m_fixedSize
Definition: uiwidget.h:67