Dillo
layout.hh
Go to the documentation of this file.
1 #ifndef __DW_LAYOUT_HH__
2 #define __DW_LAYOUT_HH__
3 
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
6 #endif
7 
8 namespace dw {
9 namespace core {
10 
17 {
18  friend class Widget;
19 
20 private:
22  {
24 
25  public:
26  LayoutImgRenderer (Layout *layout) { this->layout = layout; }
27 
28  bool readyToDraw ();
29  void getBgArea (int *x, int *y, int *width, int *height);
30  void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef);
36  void draw (int x, int y, int width, int height);
37  };
38 
40 
41 public:
48  {
49  public:
50  virtual void resizeQueued (bool extremesChanged);
51  virtual void canvasSizeChanged (int width, int ascent, int descent);
52  };
53 
55  {
56  public:
68  virtual bool enter (Widget *widget, int link, int img, int x, int y);
69 
76  virtual bool press (Widget *widget, int link, int img, int x, int y,
77  EventButton *event);
78 
85  virtual bool release (Widget *widget, int link, int img, int x, int y,
86  EventButton *event);
87 
99  virtual bool click (Widget *widget, int link, int img, int x, int y,
100  EventButton *event);
101  };
102 
104  {
105  private:
106  enum { ENTER, PRESS, RELEASE, CLICK };
107 
108  protected:
109  bool emitToReceiver (lout::signal::Receiver *receiver, int signalNo,
110  int argc, lout::object::Object **argv);
111 
112  public:
113  inline void connectLink (LinkReceiver *receiver) { connect (receiver); }
114 
115  bool emitEnter (Widget *widget, int link, int img, int x, int y);
116  bool emitPress (Widget *widget, int link, int img, int x, int y,
117  EventButton *event);
118  bool emitRelease (Widget *widget, int link, int img, int x, int y,
119  EventButton *event);
120  bool emitClick (Widget *widget, int link, int img, int x, int y,
121  EventButton *event);
122  };
123 
125 
126 private:
128  {
129  private:
131 
132  protected:
133  bool emitToReceiver (lout::signal::Receiver *receiver, int signalNo,
134  int argc, lout::object::Object **argv);
135 
136  public:
137  inline void connectLayout (Receiver *receiver) { connect (receiver); }
138 
139  void emitResizeQueued (bool extremesChanged);
140  void emitCanvasSizeChanged (int width, int ascent, int descent);
141  };
142 
144 
146  {
147  public:
148  char *name;
150  int y;
151 
152  ~Anchor ();
153  };
154 
159 
160  /* The state, which must be projected into the view. */
166 
169 
174 
178 
182 
183  /* Anchors of the widget tree */
186 
189 
191 
192  void detachWidget (Widget *widget);
193 
194  Widget *getWidgetAtPoint (int x, int y);
195  void moveToWidget (Widget *newWidgetAtPoint, ButtonState state);
196 
201  void moveToWidgetAtPoint (int x, int y, ButtonState state)
202  { moveToWidget (getWidgetAtPoint (x, y), state); }
203 
208  void moveOutOfView (ButtonState state) { moveToWidget (NULL, state); }
209 
211  bool buttonEvent (ButtonEventType type, View *view,
212  int numPressed, int x, int y, ButtonState state,
213  int button);
214  void resizeIdle ();
215  void setSizeHints ();
216  void draw (View *view, Rectangle *area);
217 
218  void scrollTo0(HPosition hpos, VPosition vpos,
219  int x, int y, int width, int height,
220  bool scrollingInterrupted);
221  void scrollIdle ();
222  void adjustScrollPos ();
223  static bool calcScrollInto (int targetValue, int requestedSize,
224  int *value, int viewportSize);
227 
228  void updateAnchor ();
229 
230  /* Widget */
231 
232  char *addAnchor (Widget *widget, const char* name);
233  char *addAnchor (Widget *widget, const char* name, int y);
234  void changeAnchor (Widget *widget, char* name, int y);
235  void removeAnchor (Widget *widget, char* name);
236  void setCursor (style::Cursor cursor);
237  void updateCursor ();
238  void queueDraw (int x, int y, int width, int height);
239  void queueDrawExcept (int x, int y, int width, int height,
240  int ex, int ey, int ewidth, int eheight);
241  void queueResize (bool extremesChanged);
242  void removeWidget ();
243 
244  /* For tests regarding the respective Layout and (mostly) Widget
245  methods. Accessed by respective methods (enter..., leave...,
246  ...Entered) defined here and in Widget. */
247 
250 
251  void enterResizeIdle () { resizeIdleCounter++; }
252  void leaveResizeIdle () { resizeIdleCounter--; }
253 
254 public:
255  Layout (Platform *platform);
256  ~Layout ();
257 
258  inline void connectLink (LinkReceiver *receiver)
259  { linkEmitter.connectLink (receiver); }
260 
261  inline bool emitLinkEnter (Widget *w, int link, int img, int x, int y)
262  { return linkEmitter.emitEnter (w, link, img, x, y); }
263 
264  inline bool emitLinkPress (Widget *w, int link, int img,
265  int x, int y, EventButton *event)
266  { return linkEmitter.emitPress (w, link, img, x, y, event); }
267 
268  inline bool emitLinkRelease (Widget *w, int link, int img,
269  int x, int y, EventButton *event)
270  { return linkEmitter.emitRelease (w, link, img, x, y, event); }
271 
272  inline bool emitLinkClick (Widget *w, int link, int img,
273  int x, int y, EventButton *event)
274  { return linkEmitter.emitClick (w, link, img, x, y, event); }
275 
277 
278  void addWidget (Widget *widget);
279  void setWidget (Widget *widget);
280 
281  void attachView (View *view);
282  void detachView (View *view);
283 
284  inline bool getUsesViewport () { return usesViewport; }
285  inline int getWidthViewport () { return viewportWidth; }
286  inline int getHeightViewport () { return viewportHeight; }
287  inline int getScrollPosX () { return scrollX; }
288  inline int getScrollPosY () { return scrollY; }
289 
290  /* public */
291 
292  void scrollTo (HPosition hpos, VPosition vpos,
293  int x, int y, int width, int height);
294  void scroll (ScrollCommand);
295  void setAnchor (const char *anchor);
296 
297  /* View */
298 
299  inline void expose (View *view, Rectangle *area) {
300  DBG_OBJ_ENTER ("draw", 0, "expose", "%d, %d, %d * %d",
301  area->x, area->y, area->width, area->height);
302  draw (view, area);
303  DBG_OBJ_LEAVE ();
304  }
305 
314  inline bool buttonPress (View *view, int numPressed, int x, int y,
315  ButtonState state, int button)
316  {
317  return buttonEvent (BUTTON_PRESS, view, numPressed, x, y, state, button);
318  }
319 
320  void containerSizeChanged ();
321 
328  inline bool buttonRelease (View *view, int numPressed, int x, int y,
329  ButtonState state, int button)
330  {
331  return buttonEvent (BUTTON_RELEASE, view, numPressed, x, y, state,
332  button);
333  }
334 
335  bool motionNotify (View *view, int x, int y, ButtonState state);
336  void enterNotify (View *view, int x, int y, ButtonState state);
337  void leaveNotify (View *view, ButtonState state);
338 
339  void scrollPosChanged (View *view, int x, int y);
340  void viewportSizeChanged (View *view, int width, int height);
341 
343  {
344  return platform;
345  }
346 
347  /* delegated */
348 
349  inline int textWidth (style::Font *font, const char *text, int len)
350  {
351  return platform->textWidth (font, text, len);
352  }
353 
354  inline char *textToUpper (const char *text, int len)
355  {
356  return platform->textToUpper (text, len);
357  }
358 
359  inline char *textToLower (const char *text, int len)
360  {
361  return platform->textToLower (text, len);
362  }
363 
364  inline int nextGlyph (const char *text, int idx)
365  {
366  return platform->nextGlyph (text, idx);
367  }
368 
369  inline int prevGlyph (const char *text, int idx)
370  {
371  return platform->prevGlyph (text, idx);
372  }
373 
374  inline float dpiX ()
375  {
376  return platform->dpiX ();
377  }
378 
379  inline float dpiY ()
380  {
381  return platform->dpiY ();
382  }
383 
384  inline style::Font *createFont (style::FontAttrs *attrs, bool tryEverything)
385  {
386  return platform->createFont (attrs, tryEverything);
387  }
388 
389  inline bool fontExists (const char *name)
390  {
391  return platform->fontExists (name);
392  }
393 
394  inline style::Color *createColor (int color)
395  {
396  return platform->createColor (color);
397  }
398 
399  inline style::Tooltip *createTooltip (const char *text)
400  {
401  return platform->createTooltip (text);
402  }
403 
404  inline void cancelTooltip ()
405  {
406  return platform->cancelTooltip ();
407  }
408 
409  inline Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height,
410  double gamma)
411  {
412  return platform->createImgbuf (type, width, height, gamma);
413  }
414 
415  inline void copySelection(const char *text)
416  {
417  platform->copySelection(text);
418  }
419 
421  {
422  return platform->getResourceFactory ();
423  }
424 
425  inline void connect (Receiver *receiver) {
426  emitter.connectLayout (receiver); }
427 
429  inline FindtextState::Result search (const char *str, bool caseSens,
430  int backwards)
431  { return findtextState.search (str, caseSens, backwards); }
432 
434  inline void resetSearch () { findtextState.resetSearch (); }
435 
436  void setBgColor (style::Color *color);
437  void setBgImage (style::StyleImage *bgImage,
438  style::BackgroundRepeat bgRepeat,
439  style::BackgroundAttachment bgAttachment,
440  style::Length bgPositionX, style::Length bgPositionY);
441 
442  inline style::Color* getBgColor () { return bgColor; }
443  inline style::StyleImage* getBgImage () { return bgImage; }
444 };
445 
446 } // namespace core
447 } // namespace dw
448 
449 #endif // __DW_LAYOUT_HH__
450 
int canvasDescent
Definition: layout.hh:168
Cursor
Definition: style.hh:200
bool drawAfterScrollReq
Definition: layout.hh:170
int canvasAscent
Definition: layout.hh:168
char * name
Definition: layout.hh:148
void detachWidget(Widget *widget)
Definition: layout.cc:348
style::Color * createColor(int color)
Definition: layout.hh:394
void containerSizeChanged()
Definition: layout.cc:1329
View * view
Definition: layout.hh:156
bool getUsesViewport()
Definition: layout.hh:284
Typed version of container::untyped::Vector.
Definition: container.hh:425
int hScrollbarThickness
Definition: layout.hh:173
virtual char * textToUpper(const char *text, int len)=0
Return the string resulting from transforming text to uppercase.
virtual char * textToLower(const char *text, int len)=0
Return the string resulting from transforming text to lowercase.
virtual bool release(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has released the mouse button on a link.
Definition: layout.cc:157
ui::ResourceFactory * getResourceFactory()
Definition: layout.hh:420
void removeAnchor(Widget *widget, char *name)
Definition: layout.cc:775
int scrollIdleId
Definition: layout.hh:180
Definition: style.hh:751
SelectionState selectionState
Definition: layout.hh:187
void connect(Receiver *receiver)
Connect a receiver to the emitter.
Definition: signal.cc:65
A factory for the common resource.
Definition: ui.hh:580
Typed version of container::untyped::HashTable.
Definition: container.hh:514
Definition: layout.hh:21
int nextGlyph(const char *text, int idx)
Definition: layout.hh:364
bool canvasHeightGreater
Definition: layout.hh:172
HPosition scrollTargetHpos
Definition: layout.hh:175
Widget * getWidgetAtPoint(int x, int y)
Definition: layout.cc:1105
void enterNotify(View *view, int x, int y, ButtonState state)
This function is called by a view, to delegate a enter notify event.
Definition: layout.cc:1061
virtual int nextGlyph(const char *text, int idx)=0
Return the index of the next glyph in string text.
void setAnchor(const char *anchor)
Definition: layout.cc:729
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
This class handles selections, as well as activation of links, which is closely related.
Definition: selection.hh:178
Definition: layout.hh:190
style::Length getBackgroundPositionX()
Definition: layout.cc:77
style::Color * bgColor
Definition: layout.hh:161
style::Font * createFont(style::FontAttrs *attrs, bool tryEverything)
Definition: layout.hh:384
VPosition scrollTargetVpos
Definition: layout.hh:176
char * requestedAnchor
Definition: layout.hh:179
bool processMouseEvent(MousePositionEvent *event, ButtonEventType type)
Common processing of press, release and motion events.
Definition: layout.cc:1217
void moveOutOfView(ButtonState state)
Emit the necessary crossing events, when the mouse pointer has moved out of the view.
Definition: layout.hh:208
void emitCanvasSizeChanged(int width, int ascent, int descent)
Definition: layout.cc:135
int queueResizeCounter
Definition: layout.hh:248
style::Length getBackgroundPositionY()
Definition: layout.cc:82
~Anchor()
Definition: layout.cc:249
int viewportHeight
Definition: layout.hh:171
LayoutImgRenderer * layoutImgRenderer
Definition: layout.hh:39
void moveToWidgetAtPoint(int x, int y, ButtonState state)
Emit the necessary crossing events, when the mouse pointer has moved to position (x, );.
Definition: layout.hh:201
char * textToLower(const char *text, int len)
Definition: layout.hh:359
The central class for managing and drawing a widget tree.
Definition: layout.hh:16
void scrollTo(HPosition hpos, VPosition vpos, int x, int y, int width, int height)
Scrolls all viewports, so that the region [x, y, width, height] is seen, according to hpos and vpos...
Definition: layout.cc:530
void emitResizeQueued(bool extremesChanged)
Definition: layout.cc:128
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
void scrollIdle()
Definition: layout.cc:561
void scrollPosChanged(View *view, int x, int y)
Definition: layout.cc:1280
int getExtremesCounter
Definition: layout.hh:248
float dpiY()
Definition: layout.hh:379
int scrollY
Definition: layout.hh:171
int scrollTargetWidth
Definition: layout.hh:177
Definition: layout.hh:145
int x
Definition: types.hh:72
int scrollTargetY
Definition: layout.hh:177
int sizeRequestCounter
Definition: layout.hh:248
Result search(const char *key, bool caseSens, bool backwards)
Definition: findtext.cc:74
A simple allocator optimized to handle many small chunks of memory. The chunks can not be free'd indi...
Definition: misc.hh:626
bool buttonRelease(View *view, int numPressed, int x, int y, ButtonState state, int button)
This function is called by a view, to delegate a button press event.
Definition: layout.hh:328
Represents a button press or release event.
Definition: events.hh:57
style::Length bgPositionY
Definition: layout.hh:165
void leaveNotify(View *view, ButtonState state)
This function is called by a view, to delegate a leave notify event.
Definition: layout.cc:1082
void addWidget(Widget *widget)
Definition: layout.cc:368
void detachView(View *view)
Definition: layout.cc:504
int getHeightViewport()
Definition: layout.hh:286
void changeAnchor(Widget *widget, char *name, int y)
Definition: layout.cc:765
Receiver interface different signals.
Definition: layout.hh:47
ButtonState
Platform independent representation.
Definition: events.hh:14
void setCursor(style::Cursor cursor)
Definition: layout.cc:801
bool emitToReceiver(lout::signal::Receiver *receiver, int signalNo, int argc, lout::object::Object **argv)
A sub class must implement this for a call to a single receiver.
Definition: layout.cc:171
int getWidthViewport()
Definition: layout.hh:285
void moveToWidget(Widget *newWidgetAtPoint, ButtonState state)
Definition: layout.cc:1126
The base class for signal emitters.
Definition: signal.hh:212
Useful (but not mandatory) base class for updates of areas with background images.
Definition: style.hh:812
int sizeAllocateCounter
Definition: layout.hh:248
void removeWidget()
Definition: layout.cc:403
bool motionNotify(View *view, int x, int y, ButtonState state)
This function is called by a view, to delegate a motion notify event.
Definition: layout.cc:1043
virtual bool fontExists(const char *name)=0
int vScrollbarThickness
Definition: layout.hh:173
virtual style::Tooltip * createTooltip(const char *text)=0
Create a tooltip.
void resizeIdle()
Definition: layout.cc:861
BackgroundAttachment
Definition: style.hh:243
Definition: style.hh:698
bool emitLinkRelease(Widget *w, int link, int img, int x, int y, EventButton *event)
Definition: layout.hh:268
Definition: layout.hh:190
Type
Definition: imgbuf.hh:164
bool emitRelease(Widget *widget, int link, int img, int x, int y, EventButton *event)
Definition: layout.cc:231
int getScrollPosY()
Definition: layout.hh:288
style::Color * getBgColor()
Definition: layout.hh:442
Definition: layout.hh:127
bool scrollIdleNotInterrupted
Definition: layout.hh:181
void queueDrawExcept(int x, int y, int width, int height, int ex, int ey, int ewidth, int eheight)
Definition: layout.cc:977
style::BackgroundAttachment getBackgroundAttachment()
Definition: layout.cc:72
style::StyleImage * bgImage
Definition: layout.hh:162
void connectLink(LinkReceiver *receiver)
Definition: layout.hh:258
#define DBG_OBJ_LEAVE()
Definition: debug_rtfl.hh:406
int scrollTargetX
Definition: layout.hh:177
Definition: layout.hh:103
int y
Definition: layout.hh:150
style::StyleImage * getBackgroundImage()
Definition: layout.cc:61
lout::misc::ZoneAllocator * textZone
Definition: layout.hh:276
Definition: layout.hh:106
float dpiX()
Definition: layout.hh:374
void updateAnchor()
Definition: layout.cc:781
void resetSearch()
See dw::core::FindtextState::resetSearch.
Definition: layout.hh:434
int currVScrollbarThickness()
Definition: layout.cc:720
HPosition
Definition: types.hh:15
Emitter emitter
Definition: layout.hh:143
void connect(Receiver *receiver)
Definition: layout.hh:425
VPosition
Definition: types.hh:25
virtual ui::ResourceFactory * getResourceFactory()=0
void attachView(View *view)
Attach a view to the layout.
Definition: layout.cc:452
Widget * topLevel
Definition: layout.hh:157
virtual void resizeQueued(bool extremesChanged)
Definition: layout.cc:94
Layout * layout
Definition: layout.hh:23
virtual bool click(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has clicked on a link.
Definition: layout.cc:163
virtual void cancelTooltip()=0
Cancel a tooltip (either shown or requested)
~Layout()
Definition: layout.cc:311
The base class of all dillo widgets.
Definition: widget.hh:23
void resetSearch()
This method is called when the user closes the "find text" dialog.
Definition: findtext.cc:150
void scrollTo0(HPosition hpos, VPosition vpos, int x, int y, int width, int height, bool scrollingInterrupted)
Definition: layout.cc:536
Base class for all mouse events related to a specific position.
Definition: events.hh:48
Definition: findtext.hh:13
Definition: style.hh:657
void expose(View *view, Rectangle *area)
Definition: layout.hh:299
The base class for signal receiver base classes.
Definition: signal.hh:253
void getBgArea(int *x, int *y, int *width, int *height)
Return the area covered by the background image.
Definition: layout.cc:40
lout::container::typed::Vector< Widget > * queueResizeList
Definition: layout.hh:158
char * textToUpper(const char *text, int len)
Definition: layout.hh:354
int getScrollPosX()
Definition: layout.hh:287
void setBgColor(style::Color *color)
Definition: layout.cc:817
int currHScrollbarThickness()
Definition: layout.cc:715
Definition: layout.hh:190
void copySelection(const char *text)
Definition: layout.hh:415
void setBgImage(style::StyleImage *bgImage, style::BackgroundRepeat bgRepeat, style::BackgroundAttachment bgAttachment, style::Length bgPositionX, style::Length bgPositionY)
Definition: layout.cc:830
Platform * platform
Definition: layout.hh:155
bool fontExists(const char *name)
Definition: layout.hh:389
#define DBG_OBJ_ENTER(aspect, prio, funname, fmt,...)
Definition: debug_rtfl.hh:404
virtual float dpiY()=0
Return screen resolution in y-direction.
Widget * widgetAtPoint
Definition: layout.hh:157
static bool calcScrollInto(int targetValue, int requestedSize, int *value, int viewportSize)
Definition: layout.cc:636
int resizeIdleId
Definition: layout.hh:180
int scrollX
Definition: layout.hh:171
virtual bool enter(Widget *widget, int link, int img, int x, int y)
Called, when a link is entered, left, or the position has changed.
Definition: layout.cc:145
void queueResize(bool extremesChanged)
Definition: layout.cc:1000
lout::container::typed::HashTable< lout::object::String, Anchor > * anchorsTable
Definition: layout.hh:185
style::BackgroundRepeat getBackgroundRepeat()
Definition: layout.cc:66
int height
Definition: types.hh:75
void cancelTooltip()
Definition: layout.hh:404
bool emitEnter(Widget *widget, int link, int img, int x, int y)
Definition: layout.cc:215
bool emitPress(Widget *widget, int link, int img, int x, int y, EventButton *event)
Definition: layout.cc:223
Definition: layout.hh:106
style::Tooltip * createTooltip(const char *text)
Definition: layout.hh:399
Definition: layout.hh:54
void connectLink(LinkReceiver *receiver)
Definition: layout.hh:113
LinkEmitter linkEmitter
Definition: layout.hh:124
char * addAnchor(Widget *widget, const char *name)
Definition: layout.cc:742
FindtextState::Result search(const char *str, bool caseSens, int backwards)
See dw::core::FindtextState::search.
Definition: layout.hh:429
virtual void copySelection(const char *text)=0
Copy selected text (0-terminated).
void getRefArea(int *xRef, int *yRef, int *widthRef, int *heightRef)
Return the "reference area".
Definition: layout.cc:47
The platform independent interface for image buffers.
Definition: imgbuf.hh:161
void adjustScrollPos()
Definition: layout.cc:623
void connectLayout(Receiver *receiver)
Definition: layout.hh:137
ButtonEventType
Definition: layout.hh:190
virtual float dpiX()=0
Return screen resolution in x-direction.
Result
Definition: findtext.hh:16
style::BackgroundRepeat bgRepeat
Definition: layout.hh:163
virtual style::Color * createColor(int color)=0
Create a color resource for a given 0xrrggbb value.
virtual style::Font * createFont(style::FontAttrs *attrs, bool tryEverything)=0
Create a (platform dependent) font.
Definition: layout.hh:106
bool emitLinkClick(Widget *w, int link, int img, int x, int y, EventButton *event)
Definition: layout.hh:272
style::StyleImage * getBgImage()
Definition: layout.hh:443
virtual bool press(Widget *widget, int link, int img, int x, int y, EventButton *event)
Called, when the user has pressed the mouse button on a link (but not yet released).
Definition: layout.cc:151
int resizeIdleCounter
Definition: layout.hh:248
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
Imgbuf * createImgbuf(Imgbuf::Type type, int width, int height, double gamma)
Definition: layout.hh:409
style::Cursor cursor
Definition: layout.hh:167
bool emitToReceiver(lout::signal::Receiver *receiver, int signalNo, int argc, lout::object::Object **argv)
A sub class must implement this for a call to a single receiver.
Definition: layout.cc:104
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
bool emitClick(Widget *widget, int link, int img, int x, int y, EventButton *event)
Definition: layout.cc:239
int textWidth(style::Font *font, const char *text, int len)
Definition: layout.hh:349
void viewportSizeChanged(View *view, int width, int height)
Definition: layout.cc:1295
int width
Definition: types.hh:74
bool usesViewport
Definition: layout.hh:170
An interface to encapsulate some platform dependencies.
Definition: platform.hh:16
virtual int prevGlyph(const char *text, int idx)=0
Return the index of the previous glyph in string text.
int canvasWidth
Definition: layout.hh:168
virtual void canvasSizeChanged(int width, int ascent, int descent)
Definition: layout.cc:98
Definition: style.hh:782
int viewportWidth
Definition: layout.hh:171
style::BackgroundAttachment bgAttachment
Definition: layout.hh:164
virtual Imgbuf * createImgbuf(Imgbuf::Type type, int width, int height, double gamma)=0
Create a (platform speficic) image buffer.
ScrollCommand
Definition: types.hh:35
void setWidget(Widget *widget)
Definition: layout.cc:430
void queueDraw(int x, int y, int width, int height)
Definition: layout.cc:964
void enterResizeIdle()
Definition: layout.hh:251
bool readyToDraw()
If this method returns false, nothing is done at all.
Definition: layout.cc:35
style::Length bgPositionX
Definition: layout.hh:165
LayoutImgRenderer(Layout *layout)
Definition: layout.hh:26
int prevGlyph(const char *text, int idx)
Definition: layout.hh:369
BackgroundRepeat
Definition: style.hh:236
int y
Definition: types.hh:73
int scrollTargetHeight
Definition: layout.hh:177
bool emitLinkEnter(Widget *w, int link, int img, int x, int y)
Definition: layout.hh:261
bool emitLinkPress(Widget *w, int link, int img, int x, int y, EventButton *event)
Definition: layout.hh:264
int Length
Type for representing all lengths within dw::core::style.
Definition: style.hh:428
Platform * getPlatform()
Definition: layout.hh:342
Widget * widget
Definition: layout.hh:149
bool buttonPress(View *view, int numPressed, int x, int y, ButtonState state, int button)
This function is called by a view, to delegate a button press event.
Definition: layout.hh:314
FindtextState findtextState
Definition: layout.hh:188
void scroll(ScrollCommand)
Definition: layout.cc:520
bool buttonEvent(ButtonEventType type, View *view, int numPressed, int x, int y, ButtonState state, int button)
Definition: layout.cc:1020
Definition: style.hh:680
virtual int textWidth(style::Font *font, const char *text, int len)=0
Return the width of a text, with a given length and font.
void leaveResizeIdle()
Definition: layout.hh:252
void draw(int x, int y, int width, int height)
Draw (or queue for drawing) an area, which is given in canvas coordinates.
Definition: layout.cc:87
Layout(Platform *platform)
Definition: layout.cc:256
void draw(View *view, Rectangle *area)
Definition: layout.cc:661
void updateCursor()
Definition: layout.cc:809