| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#ifndef FONTFORGE_GGADGET_P_H |
| 29 |
#define FONTFORGE_GGADGET_P_H |
| 30 |
|
| 31 |
#include "ggadget.h" |
| 32 |
#include "gresedit.h" |
| 33 |
|
| 34 |
struct gfuncs { |
| 35 |
unsigned int is_widget: 1; |
| 36 |
uint16_t size; |
| 37 |
int (*handle_expose)(GWindow pixmap,GGadget *g,GEvent *event); |
| 38 |
int (*handle_mouse)(GGadget *g,GEvent *event); |
| 39 |
int (*handle_key)(GGadget *g,GEvent *event); |
| 40 |
int (*handle_editcmd)(GGadget *g,enum editor_commands); |
| 41 |
int (*handle_focus)(GGadget *g,GEvent *event); |
| 42 |
int (*handle_timer)(GGadget *g,GEvent *event); |
| 43 |
int (*handle_sel)(GGadget *g,GEvent *event); |
| 44 |
|
| 45 |
void (*redraw)(GGadget *g); |
| 46 |
void (*move)(GGadget *g,int32_t x, int32_t y); |
| 47 |
void (*resize)(GGadget *g,int32_t width, int32_t height); |
| 48 |
void (*setvisible)(GGadget *g,int); |
| 49 |
void (*setenabled)(GGadget *g,int); |
| 50 |
|
| 51 |
GRect *(*getsize)(GGadget *g,GRect *); |
| 52 |
GRect *(*getinnersize)(GGadget *g,GRect *); |
| 53 |
|
| 54 |
void (*destroy)(GGadget *g); |
| 55 |
|
| 56 |
void (*set_title)(GGadget *g,const unichar_t *str); |
| 57 |
const unichar_t *(*_get_title)(GGadget *g); |
| 58 |
unichar_t *(*get_title)(GGadget *g); |
| 59 |
void (*set_imagetitle)(GGadget *g,GImage *,const unichar_t *str,int before); |
| 60 |
GImage *(*get_image)(GGadget *g); |
| 61 |
|
| 62 |
void (*set_font)(GGadget *g,GFont *); |
| 63 |
GFont *(*get_font)(GGadget *g); |
| 64 |
|
| 65 |
void (*clear_list)(GGadget *g); |
| 66 |
void (*set_list)(GGadget *g, GTextInfo **ti, int32_t copyit); |
| 67 |
GTextInfo **(*get_list)(GGadget *g,int32_t *len); |
| 68 |
GTextInfo *(*get_list_item)(GGadget *g,int32_t pos); |
| 69 |
void (*select_list_item)(GGadget *g,int32_t pos, int32_t sel); |
| 70 |
void (*select_one_list_item)(GGadget *g,int32_t pos); |
| 71 |
int32_t (*is_list_item_selected)(GGadget *g,int32_t pos); |
| 72 |
int32_t (*get_first_selection)(GGadget *g); |
| 73 |
void (*scroll_list_to_pos)(GGadget *g,int32_t pos); |
| 74 |
void (*scroll_list_to_text)(GGadget *g,const unichar_t *lab,int32_t sel); |
| 75 |
void (*set_list_orderer)(GGadget *g,int (*orderer)(const void *, const void *)); |
| 76 |
|
| 77 |
void (*get_desired_size)(GGadget *g, GRect *outer, GRect *inner); |
| 78 |
void (*set_desired_size)(GGadget *g, GRect *outer, GRect *inner); |
| 79 |
int (*fills_window)(GGadget *g); |
| 80 |
int (*is_default)(GGadget *g); |
| 81 |
}; |
| 82 |
|
| 83 |
enum gadget_state {gs_invisible, gs_disabled, gs_enabled, gs_active, |
| 84 |
gs_focused, gs_pressedactive }; |
| 85 |
|
| 86 |
struct ggadget { |
| 87 |
struct gfuncs *funcs; |
| 88 |
struct gwindow *base; |
| 89 |
GRect r; |
| 90 |
GRect inner; |
| 91 |
unichar_t mnemonic; |
| 92 |
unichar_t shortcut; |
| 93 |
short short_mask; |
| 94 |
struct ggadget *prev; |
| 95 |
unsigned int takes_input: 1; |
| 96 |
unsigned int takes_keyboard: 1; |
| 97 |
unsigned int focusable: 1; |
| 98 |
unsigned int has_focus: 1; |
| 99 |
unsigned int free_box: 1; |
| 100 |
unsigned int was_disabled: 1; |
| 101 |
unsigned int vert: 1; |
| 102 |
unsigned int opengroup: 1; |
| 103 |
unsigned int prevlabel: 1; |
| 104 |
unsigned int contained: 1; |
| 105 |
unsigned int gg_skip_hotkey_processing: 1; |
| 106 |
unsigned int gg_skip_unqualified_hotkey_processing: 1; |
| 107 |
short cid; |
| 108 |
void *data; |
| 109 |
GBox *box; |
| 110 |
enum gadget_state state; |
| 111 |
unichar_t *popup_msg; |
| 112 |
GGadgetHandler handle_controlevent; |
| 113 |
int16_t desired_width, desired_height; |
| 114 |
}; |
| 115 |
|
| 116 |
typedef struct ggadget GLine; |
| 117 |
typedef struct ggadget GGroup; |
| 118 |
|
| 119 |
typedef struct ggadget GSpacer; |
| 120 |
|
| 121 |
typedef struct glabel { |
| 122 |
GGadget g; |
| 123 |
unsigned int fh:8; |
| 124 |
unsigned int as: 8; |
| 125 |
unsigned int image_precedes: 1; |
| 126 |
unsigned int is_default: 1; |
| 127 |
unsigned int is_cancel: 1; |
| 128 |
unsigned int pressed: 1; |
| 129 |
unsigned int within: 1; |
| 130 |
unsigned int labeltype: 2; |
| 131 |
unsigned int shiftonpress: 1; |
| 132 |
FontInstance *font; |
| 133 |
unichar_t *label; |
| 134 |
GImage *image; |
| 135 |
GTextInfo **ti; |
| 136 |
uint16_t ltot; |
| 137 |
} GLabel, GButton; |
| 138 |
|
| 139 |
typedef struct gimagebutton { |
| 140 |
GGadget g; |
| 141 |
unsigned int fh:8; |
| 142 |
unsigned int as: 8; |
| 143 |
unsigned int image_precedes: 1; |
| 144 |
unsigned int is_default: 1; |
| 145 |
unsigned int is_cancel: 1; |
| 146 |
unsigned int pressed: 1; |
| 147 |
unsigned int within: 1; |
| 148 |
unsigned int labeltype: 2; |
| 149 |
unsigned int shiftonpress: 1; |
| 150 |
FontInstance *font; |
| 151 |
unichar_t *label; |
| 152 |
GImage *image, *img_within, *active, *disabled; |
| 153 |
} GImageButton; |
| 154 |
|
| 155 |
typedef struct glistbutton { |
| 156 |
GGadget g; |
| 157 |
unsigned int fh:8; |
| 158 |
unsigned int as: 8; |
| 159 |
unsigned int image_precedes: 1; |
| 160 |
unsigned int is_default: 1; |
| 161 |
unsigned int is_cancel: 1; |
| 162 |
unsigned int pressed: 1; |
| 163 |
unsigned int within: 1; |
| 164 |
unsigned int labeltype: 2; |
| 165 |
unsigned int shiftonpress: 1; |
| 166 |
FontInstance *font; |
| 167 |
unichar_t *label; |
| 168 |
GImage *image; |
| 169 |
GTextInfo **ti; |
| 170 |
uint16_t ltot; |
| 171 |
GWindow popup; |
| 172 |
} GListButton; |
| 173 |
|
| 174 |
typedef struct gcolorbutton { |
| 175 |
GGadget g; |
| 176 |
unsigned int fh:8; |
| 177 |
unsigned int as: 8; |
| 178 |
unsigned int image_precedes: 1; |
| 179 |
unsigned int is_default: 1; |
| 180 |
unsigned int is_cancel: 1; |
| 181 |
unsigned int pressed: 1; |
| 182 |
unsigned int within: 1; |
| 183 |
unsigned int labeltype: 2; |
| 184 |
unsigned int shiftonpress: 1; |
| 185 |
FontInstance *font; |
| 186 |
unichar_t *label; |
| 187 |
GImage *image; |
| 188 |
Color col; |
| 189 |
} GColorButton; |
| 190 |
|
| 191 |
typedef struct gcheck { |
| 192 |
GGadget g; |
| 193 |
unsigned int fh:8; |
| 194 |
unsigned int as: 8; |
| 195 |
unsigned int image_precedes: 1; |
| 196 |
unsigned int pressed: 1; |
| 197 |
unsigned int within: 1; |
| 198 |
unsigned int isradio: 1; |
| 199 |
unsigned int ison: 1; |
| 200 |
FontInstance *font; |
| 201 |
unichar_t *label; |
| 202 |
GImage *image; |
| 203 |
GRect onoffrect, onoffinner; |
| 204 |
GBox *onbox, *offbox; |
| 205 |
GResImage *on, *off, *ondis, *offdis; |
| 206 |
} GCheckBox; |
| 207 |
|
| 208 |
typedef struct gradio { |
| 209 |
GGadget g; |
| 210 |
unsigned int fh:8; |
| 211 |
unsigned int as: 8; |
| 212 |
unsigned int image_precedes: 1; |
| 213 |
unsigned int pressed: 1; |
| 214 |
unsigned int within: 1; |
| 215 |
unsigned int isradio: 1; |
| 216 |
unsigned int ison: 1; |
| 217 |
FontInstance *font; |
| 218 |
unichar_t *label; |
| 219 |
GImage *image; |
| 220 |
GRect onoffrect, onoffinner; |
| 221 |
GBox *onbox, *offbox; |
| 222 |
GResImage *on, *off, *ondis, *offdis; |
| 223 |
struct gradio *post; |
| 224 |
int radiogroup; |
| 225 |
} GRadio; |
| 226 |
|
| 227 |
typedef struct gscrollbar { |
| 228 |
struct ggadget g; |
| 229 |
int32_t sb_min, sb_max, sb_pagesize, sb_pos; |
| 230 |
int32_t sb_mustshow; |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
unsigned int thumbpressed: 1; |
| 235 |
unsigned int ignorenext45: 1; |
| 236 |
int8_t repeatcmd; |
| 237 |
int8_t thumbborder; |
| 238 |
int8_t sbborder; |
| 239 |
int16_t size_offset; |
| 240 |
int16_t thumboff; |
| 241 |
int16_t arrowsize; |
| 242 |
int16_t thumbsize; |
| 243 |
int16_t thumbpos; |
| 244 |
GTimer *pressed; |
| 245 |
GBox *thumbbox; |
| 246 |
} GScrollBar; |
| 247 |
|
| 248 |
typedef struct glist { |
| 249 |
GGadget g; |
| 250 |
uint8_t fh; |
| 251 |
uint8_t as; |
| 252 |
uint8_t sofar_max, sofar_pos; |
| 253 |
uint16_t ltot, loff, lcnt; |
| 254 |
uint16_t xoff, xmax; |
| 255 |
uint16_t start, end; |
| 256 |
uint16_t hmax; |
| 257 |
FontInstance *font; |
| 258 |
GTextInfo **ti; |
| 259 |
struct gscrollbar *vsb; |
| 260 |
int (*orderer)(const void *, const void *); |
| 261 |
unsigned int backwards: 1; |
| 262 |
unsigned int multiple_sel: 1; |
| 263 |
unsigned int exactly_one: 1; |
| 264 |
unsigned int parentpressed: 1; |
| 265 |
unsigned int freeti: 1; |
| 266 |
unsigned int ispopup: 1; |
| 267 |
unsigned int sameheight: 1; |
| 268 |
unsigned int always_show_sb: 1; |
| 269 |
unichar_t *sofar; |
| 270 |
GTimer *enduser; |
| 271 |
GTimer *pressed; |
| 272 |
void (*popup_callback)(GGadget *g,int pos); |
| 273 |
} GList; |
| 274 |
|
| 275 |
typedef struct gscroll1box { |
| 276 |
GGadget g; |
| 277 |
int32_t count; |
| 278 |
int32_t sbsize; |
| 279 |
int32_t minsize, oppoatmin; |
| 280 |
int32_t subwidth, subheight; |
| 281 |
int32_t oppoatcur; |
| 282 |
int32_t pad; |
| 283 |
int32_t scrollchange; |
| 284 |
int32_t offset; |
| 285 |
GGadget **children; |
| 286 |
GGadget *sb; |
| 287 |
unsigned int vertical: 1; |
| 288 |
unsigned int always_show_sb: 1; |
| 289 |
unsigned int sized_for_sb: 1; |
| 290 |
unsigned int align_flow_labels: 1; |
| 291 |
enum gg_flags just; |
| 292 |
GWindow nested; |
| 293 |
} GScroll1Box; |
| 294 |
|
| 295 |
typedef struct gtextfield { |
| 296 |
GGadget g; |
| 297 |
unsigned int cursor_on: 1; |
| 298 |
unsigned int wordsel: 1; |
| 299 |
unsigned int linesel: 1; |
| 300 |
unsigned int listfield: 1; |
| 301 |
unsigned int drag_and_drop: 1; |
| 302 |
unsigned int has_dd_cursor: 1; |
| 303 |
unsigned int hidden_cursor: 1; |
| 304 |
unsigned int multi_line: 1; |
| 305 |
unsigned int accepts_tabs: 1; |
| 306 |
unsigned int accepts_returns: 1; |
| 307 |
unsigned int wrap: 1; |
| 308 |
unsigned int password: 1; |
| 309 |
unsigned int dontdraw: 1; |
| 310 |
unsigned int numericfield: 1; |
| 311 |
unsigned int incr_down: 1; |
| 312 |
unsigned int completionfield: 1; |
| 313 |
unsigned int was_completing: 1; |
| 314 |
uint8_t fh; |
| 315 |
uint8_t as; |
| 316 |
uint8_t nw; |
| 317 |
int32_t xoff_left, loff_top; |
| 318 |
int32_t sel_start, sel_end, sel_base; |
| 319 |
int32_t sel_oldstart, sel_oldend, sel_oldbase; |
| 320 |
int32_t dd_cursor_pos; |
| 321 |
unichar_t *text, *oldtext; |
| 322 |
FontInstance *font; |
| 323 |
GTimer *pressed; |
| 324 |
GTimer *cursor; |
| 325 |
GCursor old_cursor; |
| 326 |
GScrollBar *hsb, *vsb; |
| 327 |
int32_t lcnt, lmax; |
| 328 |
int32_t *lines; |
| 329 |
int32_t xmax; |
| 330 |
GIC *gic; |
| 331 |
GTimer *numeric_scroll; |
| 332 |
char *utf8_text; |
| 333 |
int32_t *lines8; |
| 334 |
} GTextField; |
| 335 |
|
| 336 |
typedef struct glistfield { |
| 337 |
GTextField gt; |
| 338 |
GRect fieldrect, buttonrect; |
| 339 |
GTextInfo **ti; |
| 340 |
uint16_t ltot; |
| 341 |
GWindow popup; |
| 342 |
} GListField; |
| 343 |
|
| 344 |
typedef struct gcompletionfield { |
| 345 |
GListField gl; |
| 346 |
unichar_t **choices; |
| 347 |
uint16_t ctot; int16_t selected; |
| 348 |
GWindow choice_popup; |
| 349 |
GTextCompletionHandler completion; |
| 350 |
} GCompletionField; |
| 351 |
|
| 352 |
typedef struct gnumericfield { |
| 353 |
GTextField gt; |
| 354 |
GRect fieldrect, buttonrect; |
| 355 |
} GNumericField; |
| 356 |
|
| 357 |
typedef struct gmenubar { |
| 358 |
GGadget g; |
| 359 |
GMenuItem *mi; |
| 360 |
uint16_t *xs; |
| 361 |
uint16_t mtot; |
| 362 |
int16_t entry_with_mouse; |
| 363 |
int16_t lastmi; |
| 364 |
int ascender; |
| 365 |
int descender; |
| 366 |
struct gmenu *child; |
| 367 |
unsigned int pressed: 1; |
| 368 |
unsigned int initial_press: 1; |
| 369 |
unsigned int any_unmasked_shortcuts: 1; |
| 370 |
FontInstance *font; |
| 371 |
GMenuItem fake[2]; |
| 372 |
} GMenuBar; |
| 373 |
|
| 374 |
struct tabs { unichar_t *name; int16_t x, width, tw, nesting; unsigned int disabled: 1; GWindow w; }; |
| 375 |
|
| 376 |
typedef struct gtabset { |
| 377 |
struct ggadget g; |
| 378 |
struct tabs *tabs; |
| 379 |
int16_t *rowstarts; |
| 380 |
int16_t tabcnt; |
| 381 |
int16_t sel; |
| 382 |
int16_t oldsel; |
| 383 |
int16_t rcnt; |
| 384 |
int16_t active_row; |
| 385 |
int16_t offset_per_row; |
| 386 |
int16_t rowh; |
| 387 |
int16_t toff; |
| 388 |
int16_t arrow_width; |
| 389 |
int16_t arrow_size; |
| 390 |
int16_t ds; |
| 391 |
int16_t pressed_sel; |
| 392 |
unsigned int scrolled: 1; |
| 393 |
unsigned int haslarrow: 1; |
| 394 |
unsigned int hasrarrow: 1; |
| 395 |
unsigned int pressed: 1; |
| 396 |
unsigned int filllines: 1; |
| 397 |
unsigned int fill1line: 1; |
| 398 |
unsigned int vertical: 1; |
| 399 |
unsigned int nowindow: 1; |
| 400 |
bool closable, movable; |
| 401 |
FontInstance *font; |
| 402 |
void (*remove_sync)(GWindow gw, int pos); |
| 403 |
void (*swap_sync)(GWindow gw, int pos_a, int pos_b); |
| 404 |
void (*nested_expose)(GWindow pixmap, GGadget *g, GEvent *event); |
| 405 |
int (*nested_mouse)(GGadget *g, GEvent *event); |
| 406 |
int16_t vert_list_width; |
| 407 |
int16_t as, fh, offtop; |
| 408 |
GGadget *vsb; |
| 409 |
} GTabSet; |
| 410 |
|
| 411 |
struct gdirentry; |
| 412 |
typedef struct gfilechooser { |
| 413 |
struct ggadget g; |
| 414 |
GTextField *name; |
| 415 |
GList *files, *subdirs; |
| 416 |
GListButton *directories; |
| 417 |
GButton *ok, *filterb; |
| 418 |
unichar_t **mimetypes; |
| 419 |
unichar_t *wildcard; |
| 420 |
unichar_t *lastname; |
| 421 |
GFileChooserFilterType filter; |
| 422 |
GFileChooserInputFilenameFuncType inputfilenamefunc; |
| 423 |
GButton *up, *home; |
| 424 |
GButton *bookmarks, *config; |
| 425 |
struct ghvbox *topbox; |
| 426 |
unichar_t **history; |
| 427 |
unichar_t **paths; |
| 428 |
unichar_t *inputfilenameprevchar; |
| 429 |
int hpos, hcnt, hmax; |
| 430 |
} GFileChooser; |
| 431 |
|
| 432 |
typedef struct ghvbox { |
| 433 |
GGadget g; |
| 434 |
int rows, cols; |
| 435 |
int hpad, vpad; |
| 436 |
int grow_col, grow_row; |
| 437 |
GGadget **children; |
| 438 |
GGadget *label; |
| 439 |
int label_height; |
| 440 |
} GHVBox; |
| 441 |
|
| 442 |
typedef struct gflowbox { |
| 443 |
GGadget g; |
| 444 |
int count; |
| 445 |
int hpad, vpad, lpad; |
| 446 |
int label_size; |
| 447 |
enum gg_flags just; |
| 448 |
unsigned int vertical: 1; |
| 449 |
GGadget **children; |
| 450 |
GGadget *label; |
| 451 |
} GFlowBox; |
| 452 |
|
| 453 |
struct col_data { |
| 454 |
enum me_type me_type; |
| 455 |
char *(*func)(GGadget *,int r,int c); |
| 456 |
GMenuItem *enum_vals; |
| 457 |
void (*enable_enum)(GGadget *,GMenuItem *, int r, int c); |
| 458 |
GTextCompletionHandler completer; |
| 459 |
char *title; |
| 460 |
int16_t width, x; |
| 461 |
uint8_t fixed; |
| 462 |
uint8_t disabled; |
| 463 |
uint8_t hidden; |
| 464 |
}; |
| 465 |
|
| 466 |
typedef struct gmatrixedit { |
| 467 |
GGadget g; |
| 468 |
int rows, cols; |
| 469 |
int row_max; |
| 470 |
struct col_data *col_data; |
| 471 |
int hpad, vpad; |
| 472 |
unsigned int has_titles: 1; |
| 473 |
unsigned int lr_pointer: 1; |
| 474 |
unsigned int wasnew: 1; |
| 475 |
unsigned int big_done: 1; |
| 476 |
unsigned int edit_active: 1; |
| 477 |
unsigned int no_edit: 1; |
| 478 |
int pressed_col; |
| 479 |
struct matrix_data *data; |
| 480 |
int16_t as, fh; |
| 481 |
int16_t font_as, font_fh; |
| 482 |
FontInstance *font; |
| 483 |
FontInstance *titfont; |
| 484 |
GGadget *tf; |
| 485 |
int active_col, active_row; |
| 486 |
int off_top, off_left; |
| 487 |
GGadget *vsb, *hsb; |
| 488 |
GGadget *del; |
| 489 |
GGadget *up, *down; |
| 490 |
GGadget **buttonlist; |
| 491 |
GWindow nested; |
| 492 |
int16_t mark_length, mark_size, mark_skip; |
| 493 |
char *newtext; |
| 494 |
void (*initrow)(GGadget *g,int row); |
| 495 |
int (*candelete)(GGadget *g,int row); |
| 496 |
enum gme_updown (*canupdown)(GGadget *g,int row); |
| 497 |
void (*popupmenu)(GGadget *g,GEvent *e,int row,int col); |
| 498 |
int (*handle_key)(GGadget *g,GEvent *e); |
| 499 |
char *(*bigedittitle)(GGadget *g,int r, int c); |
| 500 |
void (*finishedit)(GGadget *g,int r, int c, int wasnew); |
| 501 |
char *(*validatestr)(GGadget *g,int r, int c, int wasnew, char *str); |
| 502 |
void (*setotherbuttons)(GGadget *g, int r, int c); |
| 503 |
void (*reportmousemove)(GGadget *g, int r, int c); |
| 504 |
void (*reporttextchanged)(GGadget *g, int r, int c, GGadget *textfield); |
| 505 |
void (*predelete)(GGadget *g, int r); |
| 506 |
void (*rowmotion)(GGadget *g, int oldr, int newr); |
| 507 |
} GMatrixEdit; |
| 508 |
|
| 509 |
typedef struct gdrawable { |
| 510 |
GGadget g; |
| 511 |
GWindow gw; |
| 512 |
GDrawEH e_h; |
| 513 |
} GDrawable; |
| 514 |
|
| 515 |
typedef struct rowcol { |
| 516 |
GGadget g; |
| 517 |
int rows, cols; |
| 518 |
GFont *font; |
| 519 |
int as, fh; |
| 520 |
unsigned int hrules: 1; |
| 521 |
unsigned int vrules: 1; |
| 522 |
unsigned int display_only: 1; |
| 523 |
unsigned int order_entries: 1; |
| 524 |
uint8_t hpad; |
| 525 |
int *colx; |
| 526 |
GTextInfo **labels; |
| 527 |
GTextInfo **ti; |
| 528 |
GTextField *tf; |
| 529 |
GScrollBar *vsb, *hsb; |
| 530 |
int loff, xoff; |
| 531 |
int tfr, tfc; |
| 532 |
int (*orderer)(const void *, const void *); |
| 533 |
} RowCol; |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
extern int _GScrollBar_StartTime,_GScrollBar_RepeatTime; |
| 539 |
extern int _GScrollBar_Width; |
| 540 |
extern int _GListMarkSize; |
| 541 |
extern int _GGadget_Skip; |
| 542 |
extern int _GGadget_TextImageSkip; |
| 543 |
extern GBox _GListMark_Box, _GGroup_LineBox; |
| 544 |
extern GResFont _ggadget_default_font; |
| 545 |
|
| 546 |
void _GWidget_AddGGadget(GWindow gw,struct ggadget *g); |
| 547 |
void _GWidget_RemoveGadget(struct ggadget *g); |
| 548 |
void _GWidget_SetMenuBar(GGadget *g); |
| 549 |
void _GWidget_SetDefaultButton(GGadget *g); |
| 550 |
void _GWidget_MakeDefaultButton(GGadget *g); |
| 551 |
void _GWidget_SetCancelButton(GGadget *g); |
| 552 |
void _GWidget_SetGrabGadget(GGadget *g); |
| 553 |
void _GWidget_ClearGrabGadget(GGadget *g); |
| 554 |
void _GWidget_SetPopupOwner(GGadget *g); |
| 555 |
void _GWidget_ClearPopupOwner(GGadget *g); |
| 556 |
|
| 557 |
extern void _GGadgetCopyDefaultBox(GBox *box); |
| 558 |
extern void _GGadgetInitDefaultBox(const char *class, GBox *box); |
| 559 |
extern void _ggadget_underlineMnemonic(GWindow gw,int32_t x,int32_t y,unichar_t *label, |
| 560 |
unichar_t mneumonic, Color fg,int ymax); |
| 561 |
extern void _ggadgetFigureSize(GWindow gw, GBox *design, GRect *r, int isdef); |
| 562 |
extern void _ggadgetSetRects(GGadget *g, GRect *outer, GRect *inner, int xjust, int yjust ); |
| 563 |
extern void _GGadgetCloseGroup(GGadget *g); |
| 564 |
extern void _ggadget_redraw(GGadget *g); |
| 565 |
extern int _ggadget_noop(GGadget *g, GEvent *event); |
| 566 |
extern void _ggadget_move(GGadget *g, int32_t x, int32_t y ); |
| 567 |
extern void _ggadget_resize(GGadget *g, int32_t width, int32_t height ); |
| 568 |
extern void _ggadget_setvisible(GGadget *g,int visible); |
| 569 |
extern void _ggadget_setenabled(GGadget *g,int enabled); |
| 570 |
extern GRect *_ggadget_getsize(GGadget *g,GRect *rct); |
| 571 |
extern GRect *_ggadget_getinnersize(GGadget *g,GRect *rct); |
| 572 |
extern void _ggadget_getDesiredSize(GGadget *g, GRect *outer, GRect *inner); |
| 573 |
extern void _ggadget_setDesiredSize(GGadget *g,GRect *outer, GRect *inner); |
| 574 |
void _GGroup_Init(void); |
| 575 |
|
| 576 |
extern unichar_t *_GGadgetFileToUString(char *filename,int max); |
| 577 |
|
| 578 |
extern int GBoxDrawBorder(GWindow gw,GRect *pos,GBox *design, |
| 579 |
enum gadget_state state,int is_default); |
| 580 |
extern void GBoxDrawBackground(GWindow gw,GRect *pos,GBox *design, |
| 581 |
enum gadget_state state,int is_default); |
| 582 |
extern void GBoxDrawTabOutline(GWindow pixmap, GGadget *g, int x, int y, |
| 583 |
int width, int rowh, int active ); |
| 584 |
extern int GBoxDrawHLine(GWindow gw,GRect *pos,GBox *design); |
| 585 |
extern int GBoxDrawVLine(GWindow gw,GRect *pos,GBox *design); |
| 586 |
extern int GBoxBorderWidth(GWindow gw, GBox *box); |
| 587 |
extern int GBoxExtraSpace(GGadget *g); |
| 588 |
extern int GBoxDrawnWidth(GWindow gw, GBox *box); |
| 589 |
|
| 590 |
extern int GGadgetInnerWithin(GGadget *g, int x, int y); |
| 591 |
|
| 592 |
extern int GTextInfoGetWidth(GWindow base,GTextInfo *ti,FontInstance *font); |
| 593 |
extern int GTextInfoGetMaxWidth(GWindow base,GTextInfo **ti,FontInstance *font); |
| 594 |
extern int GTextInfoGetHeight(GWindow base,GTextInfo *ti,FontInstance *font); |
| 595 |
extern int GTextInfoGetMaxHeight(GWindow base,GTextInfo **ti,FontInstance *font,int *allsame); |
| 596 |
extern int GTextInfoGetAs(GWindow base,GTextInfo *ti, FontInstance *font); |
| 597 |
extern int GTextInfoDraw(GWindow base,int x,int y,GTextInfo *ti, |
| 598 |
FontInstance *font,Color fg,Color sel,int ymax, int as, int ds); |
| 599 |
extern GTextInfo *GTextInfoCopy(GTextInfo *ti); |
| 600 |
extern GTextInfo **GTextInfoArrayFromList(GTextInfo *ti, uint16_t *cnt); |
| 601 |
extern GTextInfo **GTextInfoArrayCopy(GTextInfo **ti); |
| 602 |
extern int GTextInfoArrayCount(GTextInfo **ti); |
| 603 |
extern int GTextInfoCompare(GTextInfo *ti1, GTextInfo *ti2); |
| 604 |
extern int GMenuItemArrayMask(GMenuItem *mi); |
| 605 |
extern int GMenuItemArrayAnyUnmasked(GMenuItem *mi); |
| 606 |
extern void _GFlowBoxGetDesiredSize(GGadget *g, GRect *outer, GRect *inner, int squashed, int ignore_des); |
| 607 |
|
| 608 |
extern GGadget *_GGadget_Create(GGadget *g, struct gwindow *base, GGadgetData *gd,void *data, GBox *def); |
| 609 |
extern void _GGadget_FinalPosition(GGadget *g, struct gwindow *base, GGadgetData *gd); |
| 610 |
extern void _ggadget_destroy(GGadget *g); |
| 611 |
|
| 612 |
extern GWindow GListPopupCreate(GGadget *owner,void (*inform)(GGadget *,int), GTextInfo **ti); |
| 613 |
|
| 614 |
extern int GMenuPopupCheckKey(GEvent *event); |
| 615 |
extern int GMenuBarCheckKey(GWindow top, GGadget *g, GEvent *event); |
| 616 |
extern void _GButton_SetDefault(GGadget *g,int32_t is_default); |
| 617 |
extern void _GButtonInit(void); |
| 618 |
extern void GListMarkDraw(GWindow pixmap,int x, int y, int height, enum gadget_state state ); |
| 619 |
extern const char* const* _GGadget_GetImagePath(void); |
| 620 |
extern int _GGadget_ImageInCache(GImage *image); |
| 621 |
|
| 622 |
extern GResInfo ggadget_ri, listmark_ri; |
| 623 |
|
| 624 |
#endif |