2 * Simulator of microcontrollers (viewcl.h)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
41 #define SF_NOTHING 0x0000
42 #define SF_SELECTED 0x0001
43 #define SF_FOCUSED 0x0002
44 #define SF_ACTIVE 0x0004
47 #define OF_NOTHING 0x0000
48 #define OF_SELECTABLE 0x0001
51 class cl_box: public cl_base
57 cl_box(int ix, int iy, int iw, int ih);
58 void set(int ix, int iy, int iw, int ih);
59 void move_rel(int dx, int dy);
60 void grow(int dw, int dh);
67 class cl_view: public cl_base
73 class cl_group *parent;
74 class cl_view *next, *last;
79 unsigned int state; // See SF_XXXX
80 unsigned int options; // See OF_XXXX
82 cl_view(class cl_box *ipos, char *iname, class cl_app *iapp);
83 cl_view(char *name, class cl_app *iapp);
85 virtual int init(void);
86 virtual class cl_gin *mk_input(void);
87 virtual int *mk_palette(void);
88 virtual int is_group(void) {return(0);}
91 virtual int draw(void);
92 virtual int update(void);
93 virtual int get_color(int color);
94 virtual int *get_palette(void);
96 virtual int get_event(struct t_event *event);
97 virtual int handle_event(struct t_event *event);
98 virtual int unhandled(struct t_event *event);
99 virtual int mk_event(struct t_event *event, FILE *f, int key);
101 virtual class cl_view *prev(void);
102 virtual class cl_view *prev_view(void);
104 virtual int select(void);
105 virtual int unselect(void);
106 virtual class cl_view *get_by_state(unsigned int what, int enabled)
108 virtual int select_next() {return(0);}
109 virtual class cl_view *current_sub_view(void);
110 virtual void set_current(class cl_view *view) {}
111 virtual int terminal_view(void);
112 virtual void change_state(unsigned int what, int enable);
118 /* End of gui.src/viewcl.h */