]> Dogcows Code - chaz/openbox/blobdiff - src/frame.hh
make the 'toggle all desktops' button work
[chaz/openbox] / src / frame.hh
index 5da88902695a44569af15f2f2ff75b04e0d31e27..40c08199d012620160c25048524fb944a620f85a 100644 (file)
@@ -16,7 +16,7 @@ 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"
 
@@ -71,20 +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();
 
-  otk::Rect area() const {
-    otk::Rect a(_client->area());
-    a.setRect(a.x() - _size.left, a.y() - _size.top,
-              a.width() + _size.left + _size.right,
-              a.height() + _size.top + _size.bottom);
-    return a;
-  }
+  //! 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();
@@ -107,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.
This page took 0.025785 seconds and 4 git commands to generate.