2019-02-02 11:30:40 +08:00
|
|
|
#ifndef DIALOG_H
|
|
|
|
#define DIALOG_H
|
2017-12-06 21:43:47 +08:00
|
|
|
|
|
|
|
class c_surface;
|
|
|
|
class c_dialog;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
c_dialog* dialog;
|
|
|
|
c_surface* surface;
|
|
|
|
} DIALOG_ARRAY;
|
|
|
|
|
|
|
|
class c_dialog : public c_wnd
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static int open_dialog(c_dialog* p_dlg);
|
2018-12-02 22:39:43 +08:00
|
|
|
static int close_dialog(c_surface* surface);
|
2018-12-28 15:56:36 +08:00
|
|
|
static c_dialog* get_the_dialog(c_surface* surface);
|
2017-12-06 21:43:47 +08:00
|
|
|
virtual void on_touch_down(int x, int y);
|
|
|
|
virtual void on_touch_up(int x, int y);
|
|
|
|
protected:
|
|
|
|
virtual const char* get_class_name(void) const {return "c_dialog";}
|
|
|
|
virtual void pre_create_wnd();
|
|
|
|
virtual void on_paint();
|
2018-12-02 22:39:43 +08:00
|
|
|
static DIALOG_ARRAY ms_the_dialogs[SURFACE_CNT_MAX];
|
2017-12-06 21:43:47 +08:00
|
|
|
private:
|
|
|
|
int set_me_the_dialog();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|