2007-05-22 18:51:00 +04:00
|
|
|
#ifndef __ECONTROL_H__
|
|
|
|
#define __ECONTROL_H__
|
|
|
|
|
2007-06-15 15:05:44 +04:00
|
|
|
#include <FL/Fl_Window.h>
|
|
|
|
#include <FL/Fl_Group.h>
|
|
|
|
#include <FL/Fl_Box.h>
|
|
|
|
#include <FL/Fl_Button.h>
|
2007-05-22 18:51:00 +04:00
|
|
|
|
|
|
|
#include <edelib/IconTheme.h>
|
|
|
|
#include <edelib/ExpandableGroup.h>
|
|
|
|
|
|
|
|
struct ControlIcon {
|
|
|
|
edelib::String name;
|
|
|
|
edelib::String tip;
|
|
|
|
edelib::String exec;
|
|
|
|
edelib::String icon;
|
|
|
|
bool abspath;
|
|
|
|
int pos;
|
|
|
|
};
|
|
|
|
|
2007-06-15 15:05:44 +04:00
|
|
|
class ControlButton : public Fl_Button {
|
2007-05-22 18:51:00 +04:00
|
|
|
private:
|
2007-06-15 15:05:44 +04:00
|
|
|
Fl_Box* tip;
|
2007-05-22 18:51:00 +04:00
|
|
|
edelib::String tipval;
|
|
|
|
public:
|
2007-06-15 15:05:44 +04:00
|
|
|
ControlButton(Fl_Box* t, edelib::String tv, int x, int y, int w, int h, const char* l = 0);
|
2007-05-22 18:51:00 +04:00
|
|
|
~ControlButton();
|
|
|
|
int handle(int event);
|
|
|
|
};
|
|
|
|
|
2007-06-15 15:05:44 +04:00
|
|
|
class ControlWin : public Fl_Window {
|
2007-05-22 18:51:00 +04:00
|
|
|
private:
|
2007-06-15 15:05:44 +04:00
|
|
|
Fl_Group* titlegrp;
|
|
|
|
Fl_Box* title;
|
|
|
|
Fl_Button* close;
|
|
|
|
//Fl_Button* options;
|
2007-05-22 18:51:00 +04:00
|
|
|
edelib::ExpandableGroup* icons;
|
2007-06-15 15:05:44 +04:00
|
|
|
Fl_Box* rbox;
|
|
|
|
Fl_Box* tipbox;
|
2007-05-22 18:51:00 +04:00
|
|
|
|
2007-08-21 16:17:35 +04:00
|
|
|
edelib::list<ControlIcon> iconlist;
|
2007-05-22 18:51:00 +04:00
|
|
|
|
|
|
|
void init(void);
|
|
|
|
void load_icons(void);
|
|
|
|
|
|
|
|
public:
|
|
|
|
ControlWin(const char* title, int w = 455, int h = 330);
|
|
|
|
~ControlWin();
|
|
|
|
void do_close(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-08-20 22:43:09 +04:00
|
|
|
#endif
|