h10358 s 00002/00000/00153 d D 1.2 91/03/08 05:52:55 hopkins 2 1 c Added 2DFG and 2DBG e s 00153/00000/00000 d D 1.1 91/03/08 04:42:15 hopkins 1 0 c date and time created 91/03/08 04:42:15 by hopkins e u U f e 0 t T I 1 #ifndef _drawable_ #define _drawable_ #include struct drawable : object { drawable *members; /* override super */ drawable @parent; /* override super */ matrixtype mx; float x; float y; float w; float h; boolean placed; /* scoped */ fonttype textfont; /* scoped */ colortype BG0; /* scoped */ colortype BG; /* scoped */ colortype BG2; /* scoped */ colortype BG3; /* scoped */ colortype FG; /* scoped */ I 2 colortype 2DFG; /* scoped */ colortype 2DBG; /* scoped */ E 2 canvastype cv; /* scoped */ colortype editSELcolor; /* scoped */ colortype editCTXcolor; /* scoped */ drawable @window; /* scoped */ drawable @layout; /* scoped */ drawable @focus; /* scoped */ drawable @window_layout; /* scoped */ drawable @first_layout; /* scoped */ drawable @current_layout; /* scoped */ drawable @owner; /* scoped */ drawable @freezer; /* scoped */ /* graphics state */ graphicsstatetype gs; void gstart(); void gstop(); void greset(); void gset(); void ginit(); void gexec(name proc); void gexeca(name proc, any *args); void gfix(name proc); /* slave driving */ drawable *slaves; void addslave(drawable s); void removeslave(drawable s); void delslave(drawable s); void owner_open(); void owner_close(); /* Mapping */ boolean visible; /* scoped */ boolean mapped; void map(); void unmap(); void OnOpen(); void OnClose(); void onopen(); void onclose(); /* painting and fixing */ void Paint(); void path(); void paint(); void fix(); void damage(); /* move and resize */ boolean fixedwidth; boolean fixedheight; float preferredwidth; float preferredheight; void preferredshape(); float minwidth; float minheight; rectangle bounds(); void move(float X, float Y); void rmove(float X, float Y); void reshape(float X, float Y, float W, float H); /* validation */ boolean invalid; boolean validated; /* scoped */ void Validate(); void validate(); void invalidate(); /* position */ float posE; float posW; float posS; float posN; void Position(float X, float Y, float W, float H); void position(float W, float H); void setposition(any W, any S, any E, any N); /* placement */ name justification; /* scoped */ float place_h; float place_v; name placemode; void Placement(name mode); void placement(); void setplacement(name mode); void setjustification(name justify); /* menu handling */ menu @menu; /* scoped */ void OnMenu(); void onmenu(); /* event handling */ void OnSelect(); void OnAdjust(); void onselect(); void onadjust(); boolean inpath(eventtype e); drawable hit(eventtype e); drawable *hitlist(eventtype e); drawable *recthitlist(rectangle r); /* focus management */ nametype focus_state(); void request_focus(); void focus_change(); /* editing */ drawable @edit_ctx; drawable *edit_sel; boolean edit_mode; void edit_rmove(float X, float Y); void edit_reshape(float X, float Y, float W, float H); void paint_edit_mode(); void paint_selected(); boolean edit_reshape_handle(); void edit_select_click(); void start_edit_ctx(); void stop_edit_ctx(); void edit_ctx_selected(); void edit_ctx_parent(); }; #endif E 1