2012-05-09 19:56:06 +04:00
|
|
|
#ifndef __NOTIFYWINDOW_H__
|
|
|
|
#define __NOTIFYWINDOW_H__
|
|
|
|
|
|
|
|
#include <FL/Fl_Window.H>
|
|
|
|
#include <FL/Fl_Button.H>
|
|
|
|
#include <FL/Fl_Box.H>
|
2012-05-10 15:09:35 +04:00
|
|
|
#include <FL/Fl_Multiline_Output.H>
|
2012-05-09 19:56:06 +04:00
|
|
|
|
|
|
|
/* just keep it greater than FL_WINDOW or FL_DOUBLE_WINDOW */
|
|
|
|
#define NOTIFYWINDOW_TYPE 0xF9
|
|
|
|
|
|
|
|
class NotifyWindow : public Fl_Window {
|
|
|
|
private:
|
2012-05-10 15:09:35 +04:00
|
|
|
int id, exp;
|
2012-05-09 19:56:06 +04:00
|
|
|
Fl_Button *closeb;
|
|
|
|
Fl_Box *imgbox;
|
2012-05-10 15:09:35 +04:00
|
|
|
Fl_Multiline_Output *summary, *body;
|
2012-05-09 19:56:06 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
NotifyWindow();
|
|
|
|
|
|
|
|
void set_id(int i) { id = i; }
|
|
|
|
int get_id(void) { return id; }
|
|
|
|
|
|
|
|
void set_icon(const char *img);
|
2012-05-10 15:09:35 +04:00
|
|
|
void set_summary(const char *s) { summary->value(s); }
|
|
|
|
void set_body(const char *s) { body->value(s); }
|
2012-05-09 19:56:06 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* match to spec: if is -1, then we handle it, if is 0, then window will not be closed and
|
|
|
|
* the rest is sender specific
|
|
|
|
*/
|
|
|
|
void set_expire(int t) { exp = t; }
|
|
|
|
void show(void);
|
2012-05-10 15:09:35 +04:00
|
|
|
|
|
|
|
virtual void resize(int X, int Y, int W, int H);
|
2012-05-09 19:56:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|