00001
00002
00003 #ifndef liqcell_H
00004 #define liqcell_H
00005
00006 #include "liqbase.h"
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 typedef
00018 struct liqcell
00019 {
00020 unsigned int usagecount;
00021
00022 struct liqcell *linkparent;
00023 struct liqcell *linkprev;
00024 struct liqcell *linknext;
00025 struct liqcell *linkchild;
00026
00027
00028 int kind;
00029
00030
00031
00032
00033
00034
00035 char * name;
00036 char * classname;
00037 char * context;
00038 void * data;
00039
00040
00041
00042 int deleted;
00043 int visible;
00044 int enabled;
00045 int selected;
00046
00047
00048 int x;
00049 int y;
00050 int w;
00051 int h;
00052
00053 int kineticx;
00054 int kineticy;
00055
00056 int overlapx;
00057 int overlapy;
00058
00059
00060 int innerw;
00061 int innerh;
00062
00063
00064 struct liqcell *content;
00065
00066 liqsketch *sketch;
00067 liqimage *image;
00068 liqfont *font;
00069 int dirty;
00070 int tag;
00071 int dirtyhold;
00072 char *caption;
00073
00074 unsigned int unused[8];
00075
00076 } liqcell;
00077
00078 #define cellkind_prop 1
00079 #define cellkind_visual 2
00080 #define cellkind_widget 4
00081 #define cellkind_shown 8
00082
00083
00084 int liqcell_iskind(liqcell *self,int cellkind);
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 liqcell * liqcell_new();
00109 liqcell * liqcell_hold(liqcell *self);
00110 void liqcell_release(liqcell *self);
00111 void liqcell_free(liqcell *self);
00112
00113
00114
00115 liqcell* liqcell_quickcreatewidget(char *name,char *classname,int innerw,int innerh);
00116 liqcell* liqcell_quickcreatevis(char *name,char *classname,int x,int y,int w,int h);
00117 liqcell* liqcell_quickcreatedata(char *name,char *classname,void *data);
00118 liqcell* liqcell_quickcreatenameclass(char *name,char *classname);
00119
00120
00121
00122
00123 liqcell* liqcell_child_append(liqcell *self,liqcell *child);
00124 liqcell* liqcell_child_insert(liqcell *self,liqcell *child);
00125 liqcell* liqcell_child_insertsorted(liqcell *self, liqcell * ch);
00126 liqcell* liqcell_child_insertsortedbyname(liqcell *self, liqcell * ch,int sortpositive);
00127 int liqcell_child_remove(liqcell *self,liqcell *child);
00128 int liqcell_child_removeall(liqcell *self);
00129 int liqcell_child_removeallvisual(liqcell *self);
00130
00131 liqcell* liqcell_child_lookup(liqcell *self,char *name);
00132 liqcell* liqcell_child_lookup_simple(liqcell *self,char *name);
00133 liqcell* liqcell_child_lookup_nameclass(liqcell *self,char *name,char *classname);
00134
00135 liqcell *liqcell_lastchild(liqcell *self);
00136
00137 liqcell * liqcell_getlinkparent(liqcell *self);
00138 liqcell * liqcell_getlinkprev(liqcell *self);
00139 liqcell * liqcell_getlinknext(liqcell *self);
00140 liqcell * liqcell_getlinkchild(liqcell *self);
00141
00142 liqcell * liqcell_getlinkprev_visual(liqcell *self);
00143 liqcell * liqcell_getlinknext_visual(liqcell *self);
00144 liqcell * liqcell_getlinkchild_visual(liqcell *self);
00145
00146
00147
00148 liqcell* liqcell_findnext(liqcell *self,char *query);
00149
00150
00151
00152 liqcell* liqcell_local_lookup(liqcell *self,char *name);
00153 liqcell* liqcell_local_lookup_nameclass(liqcell *self,char *name,char *classname);
00154 liqcell* liqcell_global_lookup(liqcell *self,char *name);
00155 liqcell* liqcell_global_lookup_nameclass(liqcell *self,char *name,char *classname);
00156
00157 void * liqcell_handlerfind(liqcell *self,char *handlername);
00158 liqcell* liqcell_handleradd( liqcell *self,char *handlername, void *handler);
00159
00160
00161 liqcell* liqcell_handleradd_withcontext( liqcell *self,char *handlername, void *handler,void *context);
00162 int liqcell_handlerrun( liqcell *self,char *handlername,void *args);
00163
00164
00165
00166
00167
00168
00169
00170
00171 char* liqcell_local_lookup_getname(liqcell *self,char *name);
00172 char* liqcell_local_lookup_getcaption(liqcell *self,char *name);
00173
00174
00175
00176
00177 void liqcell_setname(liqcell *self,char *name);
00178 char * liqcell_getname(liqcell *self);
00179
00180
00181
00182 void liqcell_setcaption(liqcell *self,char *caption);
00183 char * liqcell_getcaption(liqcell *self);
00184
00185
00186
00187 void liqcell_setclassname(liqcell *self,char *classname);
00188 char * liqcell_getclassname(liqcell *self);
00189
00190
00191
00192 void liqcell_setcontext(liqcell *self,char *context);
00193 char * liqcell_getcontext(liqcell *self);
00194
00195
00196
00197
00198
00199 void liqcell_setcontent(liqcell *self,liqcell *content);
00200 liqcell * liqcell_getcontent(liqcell *content);
00201
00202 int liqcell_getqualifiedname(liqcell *self, char *buff, int buffmax);
00203
00204 void liqcell_setdata(liqcell *self,void *data);
00205 void * liqcell_getdata(liqcell *self);
00206
00207
00208 void liqcell_settag(liqcell *self,void *tag);
00209 void * liqcell_gettag(liqcell *self);
00210
00211
00212
00213
00214
00215
00216
00217 void liqcell_setvisible(liqcell *self,int arg);
00218 int liqcell_getvisible(liqcell *self);
00219
00220 void liqcell_setenabled(liqcell *self,int arg);
00221 int liqcell_getenabled(liqcell *self);
00222
00223 void liqcell_setselected(liqcell *self,int arg);
00224 int liqcell_getselected(liqcell *self);
00225
00226 void liqcell_setdirty(liqcell *self,int dirty);
00227 int liqcell_getdirty(liqcell *self);
00228
00229 void liqcell_setdirtyhold(liqcell *self,int dirtyhold);
00230 int liqcell_getdirtyhold(liqcell *self);
00231
00232
00233 void liqcell_setshown(liqcell *self,int arg);
00234 int liqcell_getshown(liqcell *self);
00235
00236 int liqcell_getflagvisual(liqcell *self);
00237 int liqcell_getflagwidget(liqcell *self);
00238
00239
00240 void liqcell_setsketch(liqcell *self,liqsketch *sketch);
00241 liqsketch*liqcell_getsketch(liqcell *self);
00242
00243
00244 void liqcell_setimage(liqcell *self,liqimage *image);
00245 liqimage *liqcell_getimage(liqcell *self);
00246
00247 void liqcell_setfont(liqcell *self,liqfont *font);
00248 liqfont *liqcell_getfont(liqcell *self);
00249
00250
00251 void liqcell_sketch_autoload(liqcell *self);
00252
00253
00254
00255 void liqcell_setpos(liqcell *self,int x,int y);
00256 void liqcell_setsize(liqcell *self,int w,int h);
00257 void liqcell_adjustpos(liqcell *self,int dx,int dy);
00258 void liqcell_adjustsize(liqcell *self,int dw,int dh);
00259 void liqcell_setkinetic(liqcell *self,int kx,int ky);
00260 void liqcell_setrect(liqcell *self,int x,int y,int w,int h);
00261
00262 int liqcell_movetowardsrect(liqcell *self,int x,int y,int w,int h, float fraction);
00263
00264
00265 void liqcell_setrect_autoscale(liqcell *self,int x,int y,int w,int h,float sx,float sy);
00266
00267 int liqcell_getx(liqcell *self);
00268 int liqcell_gety(liqcell *self);
00269 int liqcell_getw(liqcell *self);
00270 int liqcell_geth(liqcell *self);
00271 int liqcell_getinnerw(liqcell *self);
00272 int liqcell_getinnerh(liqcell *self);
00273 int liqcell_getkineticx(liqcell *self);
00274 int liqcell_getkineticy(liqcell *self);
00275
00276 void liqcell_forceinboundparent(liqcell *self);
00277 int liqcell_ensurevisible(liqcell *self);
00278 int liqcell_ensurevisible_centred(liqcell *self);
00279
00280
00281 void liqcell_zorder_totop(liqcell *self);
00282 liqcell * liqcell_getbasewidget(liqcell *self);
00283
00284 void liqcell_print(liqcell *self,char *title,int recdep);
00285 void liqcell_print2(liqcell *self);
00286
00287
00288
00289
00290 int liqcell_child_countvisible(liqcell *self);
00291
00292 int liqcell_child_arrange_easytile(liqcell *self);
00293 int liqcell_child_arrange_easyrow(liqcell *self);
00294 int liqcell_child_arrange_easycol(liqcell *self);
00295
00296
00297 int liqcell_child_arrange_autoflow(liqcell *self);
00298 int liqcell_child_arrange_nooverlap(liqcell *self,liqcell *currentselection);
00299 int liqcell_child_arrange_makegrid(liqcell *self,int viscolcount,int visrowcount);
00300
00301
00302
00303
00304
00305
00306
00307
00308 #endif