X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fframe.hh;h=40c08199d012620160c25048524fb944a620f85a;hb=7b7ae097a0d389a35967fdab4ea310effcfc42c2;hp=0a22cbaa1244edd75e6b05123a801151e6fbd259;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/frame.hh b/src/frame.hh index 0a22cbaa..40c08199 100644 --- a/src/frame.hh +++ b/src/frame.hh @@ -16,8 +16,9 @@ extern "C" { #include "otk/strut.hh" #include "otk/rect.hh" #include "otk/screeninfo.hh" -#include "otk/style.hh" +#include "otk/renderstyle.hh" #include "otk/widget.hh" +#include "otk/ustring.hh" #include @@ -39,9 +40,6 @@ private: Client *_client; const otk::ScreenInfo *_screen; - //! The style to use for size and display the decorations - otk::Style *_style; - //! The size of the frame on each side of the client window otk::Strut _size; @@ -73,12 +71,15 @@ public: @param client The client window which will be decorated by the new Frame @param style The style to use to decorate the frame */ - Frame(Client *client, otk::Style *style); + Frame(Client *client, otk::RenderStyle *style); //! Destroys the Frame object virtual ~Frame(); + //! Returns the size of the frame on each side of the client + const otk::Strut& size() const { return _size; } + //! Set the style to decorate the frame with - virtual void setStyle(otk::Style *style); + virtual void setStyle(otk::RenderStyle *style); //! Empty overridden method to prevent automatic alignment of children virtual void adjust(); @@ -88,7 +89,7 @@ public: //! Displays unfocused decorations virtual void unfocus(); - void setTitle(const std::string &text); + void setTitle(const otk::ustring &text); //! Reparents the client window from the root window onto the frame void grabClient(); @@ -101,6 +102,9 @@ public: void adjustPosition(); //! Shape the frame window to the client window void adjustShape(); + //! Update the frame to match the client's new state (for things like toggle + //! buttons) + void adjustState(); //! Applies gravity to the client's position to find where the frame should //! be positioned.