]> Dogcows Code - chaz/openbox/blobdiff - src/Toolbar.hh
on reconfigure, save all of the open submenus instead of just one, and then reopen...
[chaz/openbox] / src / Toolbar.hh
index 5ec3029c148329604c3f90673edeaa740401dd68..f9dd54816557d18c223d922c7eb30476942fd2f3 100644 (file)
@@ -41,12 +41,15 @@ private:
   private:
     Placementmenu(const Placementmenu&);
     Placementmenu& operator=(const Placementmenu&);
+    Toolbar *toolbar;
 
   protected:
     virtual void itemSelected(int button, unsigned int index);
+    virtual void setValues(void);
 
   public:
     Placementmenu(Toolbarmenu *tm);
+    virtual void reconfigure(void);
   };
 
   Toolbar *toolbar;
@@ -61,6 +64,7 @@ private:
 protected:
   virtual void itemSelected(int button, unsigned int index);
   virtual void internal_hide(void);
+  virtual void setValues(void);
 
 public:
   Toolbarmenu(Toolbar *tb);
@@ -68,13 +72,16 @@ public:
 
   inline Basemenu *getPlacementmenu(void) { return placementmenu; }
 
-  void reconfigure(void);
+  virtual void reconfigure(void);
 };
 
 
 class Toolbar : public TimeoutHandler {
 private:
   bool on_top, editing, hidden, do_auto_hide;
+  unsigned int width_percent;
+  int placement;
+  std::string toolbarstr;
   Display *display;
 
   struct ToolbarFrame {
@@ -99,6 +106,7 @@ private:
 
   Blackbox *blackbox;
   BScreen *screen;
+  Configuration *config;
   BTimer *clock_timer, *hide_timer;
   Toolbarmenu *toolbarmenu;
   Strut strut;
@@ -136,6 +144,19 @@ public:
   inline bool isOnTop(void) const { return on_top; }
   inline bool isHidden(void) const { return hidden; }
   inline bool doAutoHide(void) const { return do_auto_hide; }
+  inline unsigned int getWidthPercent(void) const { return width_percent; }
+  inline int getPlacement(void) const { return placement; }
+  void saveOnTop(bool);
+  void saveAutoHide(bool);
+  void saveWidthPercent(unsigned int);
+  void savePlacement(int);
+
+  void save_rc(void);
+  void load_rc(void);
+
+  void mapToolbar(void);
+  void unmapToolbar(void);
 
   inline Window getWindowID(void) const { return frame.window; }
 
@@ -143,7 +164,9 @@ public:
   inline unsigned int getWidth(void) const { return frame.rect.width(); }
   inline unsigned int getHeight(void) const { return frame.rect.height(); }
   inline unsigned int getExposedHeight(void) const
-  { return ((do_auto_hide) ? frame.bevel_w : frame.rect.height()); }
+  { return (screen->doHideToolbar() ? 0 :
+            ((do_auto_hide) ? frame.bevel_w :
+             frame.rect.height())); }
   inline int getX(void) const
   { return ((hidden) ? frame.x_hidden : frame.rect.x()); }
   inline int getY(void) const
This page took 0.022172 seconds and 4 git commands to generate.