]> Dogcows Code - chaz/openbox/blobdiff - src/Slit.h
renamed the obResource class to Resource.
[chaz/openbox] / src / Slit.h
index 1cb89751d004aa5913e190be9459bc94252f6c1c..b7dedb5a6aa0514211a9b0515a7658fc3dfd5ad8 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "Basemenu.h"
 #include "LinkedList.h"
+#include "Geometry.h"
 
 // forward declaration
 class Slit;
@@ -37,30 +38,30 @@ class Slitmenu : public Basemenu {
 private: 
   class Directionmenu : public Basemenu {
   private:
-    Slitmenu *slitmenu;
+    Slitmenu &slitmenu;
 
   protected:
     virtual void itemSelected(int, int);
 
   public:
-    Directionmenu(Slitmenu *);
+    Directionmenu(Slitmenu &);
   };
 
   class Placementmenu : public Basemenu {
   private:
-    Slitmenu *slitmenu;
+    Slitmenu &slitmenu;
 
   protected: 
     virtual void itemSelected(int, int);
 
   public:
-    Placementmenu(Slitmenu *);
+    Placementmenu(Slitmenu &);
   };
 
   Directionmenu *directionmenu;
   Placementmenu *placementmenu;
 
-  Slit *slit;
+  Slit &slit;
 
   friend class Directionmenu;
   friend class Placementmenu;
@@ -73,7 +74,7 @@ protected:
 
 
 public:
-  Slitmenu(Slit *);
+  Slitmenu(Slit &);
   virtual ~Slitmenu(void);
 
   inline Basemenu *getDirectionmenu(void) { return directionmenu; }
@@ -96,8 +97,8 @@ private:
   Bool on_top, hidden, do_auto_hide;
   Display *display;
 
-  Openbox *openbox;
-  BScreen *screen;
+  Openbox &openbox;
+  BScreen &screen;
   BTimer *timer;
 
   LinkedList<SlitClient> *clientList;
@@ -107,17 +108,20 @@ private:
     Pixmap pixmap;
     Window window;
 
-    int x, y, x_hidden, y_hidden;
-    unsigned int width, height;
+    //int x, y, x_hidden, y_hidden;
+    //unsigned int width, height;
+    Rect area;
+    Point hidden;
   } frame;
 
+
   friend class Slitmenu;
   friend class Slitmenu::Directionmenu;
   friend class Slitmenu::Placementmenu;
 
 
 public:
-  Slit(BScreen *);
+  Slit(BScreen &);
   virtual ~Slit();
 
   inline const Bool &isOnTop(void) const { return on_top; }
@@ -128,13 +132,17 @@ public:
 
   inline const Window &getWindowID() const { return frame.window; }
 
-  inline const int &getX(void) const
-  { return ((hidden) ? frame.x_hidden : frame.x); }
-  inline const int &getY(void) const
-  { return ((hidden) ? frame.y_hidden : frame.y); }
+  //inline const int &getX(void) const
+  //{ return ((hidden) ? frame.x_hidden : frame.x); }
+  //inline const int &getY(void) const
+  //{ return ((hidden) ? frame.y_hidden : frame.y); }
+  inline const Point &origin() const { return frame.area.origin(); }
+  
+  //inline const unsigned int &getWidth(void) const { return frame.width; }
+  //inline const unsigned int &getHeight(void) const { return frame.height; }
+  inline const Size &size() const { return frame.area.size(); }
 
-  inline const unsigned int &getWidth(void) const { return frame.width; }
-  inline const unsigned int &getHeight(void) const { return frame.height; }
+  inline const Rect &area() const { return frame.area; }
 
   void addClient(Window);
   void removeClient(SlitClient *, Bool = True);
This page took 0.023563 seconds and 4 git commands to generate.