2009-10-03 11:33:08 +04:00
|
|
|
#ifndef __PANEL_H__
|
|
|
|
#define __PANEL_H__
|
|
|
|
|
|
|
|
#include <edelib/Window.h>
|
|
|
|
#include "AppletManager.h"
|
|
|
|
|
2011-10-26 20:04:37 +04:00
|
|
|
#define EDE_PANEL_CAST_TO_PANEL(obj) ((Panel*)(obj))
|
|
|
|
#define EDE_PANEL_GET_PANEL_OBJECT(w) (EDE_PANEL_CAST_TO_PANEL(w->parent()))
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
EDELIB_NS_USING_AS(Window, PanelWindow)
|
|
|
|
|
2009-11-18 15:24:58 +03:00
|
|
|
enum {
|
|
|
|
PANEL_POSITION_TOP,
|
|
|
|
PANEL_POSITION_BOTTOM
|
|
|
|
};
|
|
|
|
|
2009-10-03 11:33:08 +04:00
|
|
|
class Panel : public PanelWindow {
|
|
|
|
private:
|
|
|
|
Fl_Widget *clicked;
|
2009-11-18 15:24:58 +03:00
|
|
|
int vpos;
|
2009-10-03 11:33:08 +04:00
|
|
|
int sx, sy;
|
|
|
|
int screen_x, screen_y, screen_w, screen_h, screen_h_half;
|
|
|
|
bool can_move_widgets;
|
|
|
|
|
|
|
|
AppletManager mgr;
|
|
|
|
|
2009-11-18 15:24:58 +03:00
|
|
|
void read_config(void);
|
|
|
|
void save_config(void);
|
2009-10-03 11:33:08 +04:00
|
|
|
void do_layout(void);
|
|
|
|
|
|
|
|
public:
|
2009-11-18 15:24:58 +03:00
|
|
|
Panel();
|
2009-10-03 11:33:08 +04:00
|
|
|
|
|
|
|
void show(void);
|
2009-11-18 15:24:58 +03:00
|
|
|
void hide(void);
|
|
|
|
int handle(int e);
|
2009-10-03 11:33:08 +04:00
|
|
|
void load_applets(void);
|
|
|
|
|
|
|
|
int panel_w(void) { return w(); }
|
|
|
|
int panel_h(void) { return h(); }
|
2011-10-26 20:04:37 +04:00
|
|
|
|
|
|
|
void relayout(void) { do_layout(); }
|
2009-10-03 11:33:08 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|