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;
protected:
virtual void itemSelected(int button, unsigned int index);
virtual void internal_hide(void);
+ virtual void setValues(void);
public:
Toolbarmenu(Toolbar *tb);
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 {
Window window, workspace_label, window_label, clock, psbutton, nsbutton,
pwbutton, nwbutton;
- int x_hidden, y_hidden, hour, minute, grab_x, grab_y;
+ int x_hidden, y_hidden, hour, minute;
unsigned int window_label_w, workspace_label_w, clock_w,
button_w, bevel_w, label_h;
Blackbox *blackbox;
BScreen *screen;
+ Configuration *config;
BTimer *clock_timer, *hide_timer;
Toolbarmenu *toolbarmenu;
Strut strut;
friend class Toolbarmenu;
friend class Toolbarmenu::Placementmenu;
+ void drawArrow(Drawable surface, bool left) const;
void redrawPrevWorkspaceButton(bool pressed = False, bool redraw = False);
void redrawNextWorkspaceButton(bool pressed = False, bool redraw = False);
void redrawPrevWindowButton(bool preseed = False, bool redraw = False);
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; }
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
{ return ((hidden) ? frame.y_hidden : frame.rect.y()); }
- void buttonPressEvent(XButtonEvent *be);
- void buttonReleaseEvent(XButtonEvent *re);
- void enterNotifyEvent(XCrossingEvent * /*unused*/);
- void leaveNotifyEvent(XCrossingEvent * /*unused*/);
- void exposeEvent(XExposeEvent *ee);
- void keyPressEvent(XKeyEvent *ke);
+ void buttonPressEvent(const XButtonEvent *be);
+ void buttonReleaseEvent(const XButtonEvent *re);
+ void enterNotifyEvent(const XCrossingEvent * /*unused*/);
+ void leaveNotifyEvent(const XCrossingEvent * /*unused*/);
+ void exposeEvent(const XExposeEvent *ee);
+ void keyPressEvent(const XKeyEvent *ke);
void edit(void);
void reconfigure(void);