2007-05-22 18:51:00 +04:00
|
|
|
#ifndef __ECONTROL_H__
|
|
|
|
#define __ECONTROL_H__
|
|
|
|
|
2006-08-20 22:43:09 +04:00
|
|
|
#include <fltk/Window.h>
|
|
|
|
#include <fltk/Group.h>
|
|
|
|
#include <fltk/InvisibleBox.h>
|
|
|
|
#include <fltk/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;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ControlButton : public fltk::Button {
|
|
|
|
private:
|
|
|
|
fltk::InvisibleBox* tip;
|
|
|
|
edelib::String tipval;
|
|
|
|
public:
|
|
|
|
ControlButton(fltk::InvisibleBox* t, edelib::String tv, int x, int y, int w, int h, const char* l = 0);
|
|
|
|
~ControlButton();
|
|
|
|
void draw(void);
|
|
|
|
int handle(int event);
|
|
|
|
};
|
|
|
|
|
|
|
|
class ControlWin : public fltk::Window {
|
|
|
|
private:
|
|
|
|
fltk::Group* titlegrp;
|
|
|
|
fltk::InvisibleBox* title;
|
|
|
|
fltk::Button* close;
|
|
|
|
fltk::Button* options;
|
|
|
|
edelib::ExpandableGroup* icons;
|
|
|
|
fltk::InvisibleBox* rbox;
|
|
|
|
fltk::InvisibleBox* tipbox;
|
|
|
|
|
|
|
|
edelib::vector<ControlIcon> iconlist;
|
|
|
|
|
|
|
|
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
|