]> Dogcows Code - chaz/openbox/blobdiff - src/frame.hh
add cvsignores
[chaz/openbox] / src / frame.hh
index c75194c44cd136333a2bb10728ae070646bb419c..7fa7a513fdd7c8194101df19e71e04a1e0799a3b 100644 (file)
@@ -9,6 +9,7 @@ extern "C" {
 #include <X11/Xlib.h>
 }
 
+#include "client.hh"
 #include "python.hh"
 #include "otk/strut.hh"
 #include "otk/rect.hh"
@@ -22,8 +23,6 @@ extern "C" {
 
 namespace ob {
 
-class Client;
-
 //! Varius geometry settings in the frame decorations
 struct FrameGeometry {
   int width; // title and handle
@@ -33,6 +32,11 @@ struct FrameGeometry {
   int label_height() { return font_height; }
   int handle_height; // static, from the style
   int icon_x;        // x-position of the window icon button
+  int title_x;       // x-position of the window title
+  int iconify_x;     // x-position of the window iconify button
+  int desktop_x;     // x-position of the window all-desktops button
+  int max_x;         // x-position of the window maximize button
+  int close_x;       // x-position of the window close button
   int handle_y;
   int button_size;   // static, from the style
   int grip_width() { return button_size * 2; }
@@ -66,6 +70,9 @@ private:
   otk::Rect _area;
 
   bool _visible;
+
+  //! The decorations that are being displayed in the frame.
+  Client::DecorationFlags _decorations;
   
   // decoration windows
   Window  _frame;   // sits under everything
@@ -93,12 +100,14 @@ private:
   otk::Surface  *_icon_sur;
   otk::Surface  *_close_sur;
 
-  std::string _layout; // layout of the titlebar
+  otk::ustring _layout; // layout of the titlebar
+
   bool _max_press;
   bool _desk_press;
   bool _iconify_press;
   bool _icon_press;
   bool _close_press;
+  unsigned int _press_button; // mouse button that started the press
 
   FrameGeometry geom;
   
@@ -142,6 +151,7 @@ public:
   void adjustState();
   void adjustFocus();
   void adjustTitle();
+  void adjustIcon();
 
   //! Applies gravity to the client's position to find where the frame should
   //! be positioned.
@@ -168,6 +178,9 @@ public:
   //! Hides the frame
   void hide();
 
+  void buttonPressHandler(const XButtonEvent &e);
+  void buttonReleaseHandler(const XButtonEvent &e);
+
   //! Returns the MouseContext for the given window id
   /*!
     Returns '-1' if no valid mouse context exists in the frame for the given
This page took 0.027521 seconds and 4 git commands to generate.