diff options
Diffstat (limited to 'dw/layout.hh')
-rw-r--r-- | dw/layout.hh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dw/layout.hh b/dw/layout.hh index 51d764a4..47554b42 100644 --- a/dw/layout.hh +++ b/dw/layout.hh @@ -17,6 +17,27 @@ class Layout: public lout::object::Object { friend class Widget; +private: + class LayoutImgRenderer: public style::StyleImage::ExternalImgRenderer + { + Layout *layout; + + public: + LayoutImgRenderer (Layout *layout) { this->layout = layout; } + + bool readyToDraw (); + void getBgArea (int *x, int *y, int *width, int *height); + void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef); + style::StyleImage *getBackgroundImage (); + style::BackgroundRepeat getBackgroundRepeat (); + style::BackgroundAttachment getBackgroundAttachment (); + style::Length getBackgroundPositionX (); + style::Length getBackgroundPositionY (); + void draw (int x, int y, int width, int height); + }; + + LayoutImgRenderer *layoutImgRenderer; + public: /** * \brief Receiver interface different signals. @@ -135,6 +156,11 @@ private: /* The state, which must be projected into the view. */ style::Color *bgColor; + style::StyleImage *bgImage; + style::BackgroundRepeat bgRepeat; + style::BackgroundAttachment bgAttachment; + style::Length bgPositionX, bgPositionY; + style::Cursor cursor; int canvasWidth, canvasAscent, canvasDescent; @@ -386,8 +412,13 @@ public: inline void resetSearch () { findtextState.resetSearch (); } void setBgColor (style::Color *color); + void setBgImage (style::StyleImage *bgImage, + style::BackgroundRepeat bgRepeat, + style::BackgroundAttachment bgAttachment, + style::Length bgPositionX, style::Length bgPositionY); inline style::Color* getBgColor () { return bgColor; } + inline style::StyleImage* getBgImage () { return bgImage; } }; } // namespace core |