| 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 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
#ifndef BLT_TREEVIEW_H |
| 42 |
#define BLT_TREEVIEW_H |
| 43 |
|
| 44 |
#include "bltImage.h" |
| 45 |
#include "bltHash.h" |
| 46 |
#include "bltChain.h" |
| 47 |
#include "bltTree.h" |
| 48 |
#include "bltTile.h" |
| 49 |
#include "bltBind.h" |
| 50 |
#include "bltObjConfig.h" |
| 51 |
|
| 52 |
#define ITEM_ENTRY (ClientData)0 |
| 53 |
#define ITEM_ENTRY_BUTTON (ClientData)1 |
| 54 |
#define ITEM_COLUMN_TITLE (ClientData)2 |
| 55 |
#define ITEM_COLUMN_RULE (ClientData)3 |
| 56 |
#define ITEM_STYLE (ClientData)0x10004 |
| 57 |
|
| 58 |
#if HAVE_UTF |
| 59 |
#else |
| 60 |
#define Tcl_NumUtfChars(s,n) (((n) == -1) ? strlen((s)) : (n)) |
| 61 |
#define Tcl_UtfAtIndex(s,i) ((s) + (i)) |
| 62 |
#endif |
| 63 |
|
| 64 |
#define ODD(x) ((x) | 0x01) |
| 65 |
|
| 66 |
#define END (-1) |
| 67 |
#define SEPARATOR_LIST ((char *)NULL) |
| 68 |
#define SEPARATOR_NONE ((char *)-1) |
| 69 |
|
| 70 |
#define SEARCH_Y 1 |
| 71 |
|
| 72 |
typedef char *UID; |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
#define UCHAR(c) ((unsigned char) (c)) |
| 80 |
|
| 81 |
#define TOGGLE(x, mask) (((x) & (mask)) ? ((x) & ~(mask)) : ((x) | (mask))) |
| 82 |
|
| 83 |
|
| 84 |
#define SCREENX(h, wx) ((wx) - (h)->xOffset + (h)->insetX) |
| 85 |
#define SCREENY(h, wy) ((wy) - (h)->yOffset + (h)->insetY + (h)->titleHeight) |
| 86 |
|
| 87 |
#define WORLDX(h, sx) ((sx) - (h)->insetX + (h)->xOffset) |
| 88 |
#define WORLDY(h, sy) ((sy) - ((h)->insetY + (h)->titleHeight) + (h)->yOffset) |
| 89 |
|
| 90 |
#define VPORTWIDTH(h) (Tk_Width((h)->tkwin) - 2 * (h)->insetX) |
| 91 |
#define VPORTHEIGHT(h) \ |
| 92 |
(Tk_Height((h)->tkwin) - (h)->titleHeight - 2 * (h)->insetY) |
| 93 |
|
| 94 |
#define ICONWIDTH(d) (tvPtr->levelInfo[(d)].iconWidth) |
| 95 |
#define LEVELX(d) (tvPtr->levelInfo[(d)].x) |
| 96 |
|
| 97 |
#define DEPTH(h, n) \ |
| 98 |
(((h)->flatView) ? 0 : Blt_TreeNodeDepth((h)->tree, (n))) |
| 99 |
|
| 100 |
#define SELECT_FG(t) \ |
| 101 |
(((((t)->flags & TV_FOCUS)) || ((t)->selOutFocusFgColor == NULL)) \ |
| 102 |
? (t)->selInFocusFgColor : (t)->selOutFocusFgColor) |
| 103 |
#define SELECT_BORDER(t) \ |
| 104 |
(((((t)->flags & TV_FOCUS)) || ((t)->selOutFocusBorder == NULL)) \ |
| 105 |
? (t)->selInFocusBorder : (t)->selOutFocusBorder) |
| 106 |
|
| 107 |
#define FLATIND(tvPtr, n) ((tvPtr->flatArr == NULL) || (n) >= tvPtr->nEntries ? NULL : tvPtr->flatArr[n]) |
| 108 |
|
| 109 |
#define SELECT_MODE_SINGLE (1<<0) |
| 110 |
#define SELECT_MODE_MULTIPLE (1<<1) |
| 111 |
#define SELECT_MODE_NONE (1<<2) |
| 112 |
#define SELECT_MODE_CELL (1<<3) |
| 113 |
#define SELECT_MODE_MCELL (1<<4) |
| 114 |
#define SELECT_MODE_CELLMASK (SELECT_MODE_CELL|SELECT_MODE_MCELL) |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
#define TV_LAYOUT (1<<0) |
| 153 |
#define TV_REDRAW (1<<1) |
| 154 |
#define TV_XSCROLL (1<<2) |
| 155 |
#define TV_YSCROLL (1<<3) |
| 156 |
#define TV_SCROLL (TV_XSCROLL | TV_YSCROLL) |
| 157 |
#define TV_FOCUS (1<<4) |
| 158 |
#define TV_DIRTY (1<<5) |
| 159 |
#define TV_UPDATE (1<<6) |
| 160 |
#define TV_RESORT (1<<7) |
| 161 |
#define TV_SORTED (1<<8) |
| 162 |
#define TV_SORT_PENDING (1<<9) |
| 163 |
#define TV_BORDERS (1<<10) |
| 164 |
#define TV_VIEWPORT (1<<11) |
| 165 |
#define TV_DIRTYALL (1<<12) |
| 166 |
#define TV_PICKING (1<<13) |
| 167 |
#define TV_ATTACH (1<<14) |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
#define TV_RULE_ACTIVE (1<<15) |
| 182 |
#define TV_RULE_NEEDED (1<<16) |
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
#define TV_SELECT_CLEAR (1<<16) |
| 205 |
#define TV_SELECT_EXPORT (1<<17) |
| 206 |
#define TV_SELECT_PENDING (1<<18) |
| 207 |
#define TV_SELECT_SET (1<<19) |
| 208 |
#define TV_SELECT_TOGGLE (TV_SELECT_SET | TV_SELECT_CLEAR) |
| 209 |
#define TV_SELECT_MASK (TV_SELECT_SET | TV_SELECT_CLEAR) |
| 210 |
#define TV_SELECT_SORTED (1<<20) |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
#define TV_ALLOW_DUPLICATES (1<<21) |
| 230 |
#define TV_FILL_ANCESTORS (1<<22) |
| 231 |
#define TV_HIDE_ROOT (1<<23) |
| 232 |
#define TV_HIDE_LEAVES (1<<24) |
| 233 |
#define TV_SHOW_COLUMN_TITLES (1<<25) |
| 234 |
#define TV_SORT_AUTO (1<<26) |
| 235 |
#define TV_NEW_TAGS (1<<27) |
| 236 |
#define TV_NOAUTO_CLOSE_LEAF (1<<28) |
| 237 |
|
| 238 |
#define TV_HIDE_ICONS (1<<29) |
| 239 |
#define TV_FILL_NULL (1<<30) |
| 240 |
#define TV_DELETED (1<<31) |
| 241 |
|
| 242 |
#define TV_ITEM_COLUMN 1 |
| 243 |
#define TV_ITEM_RULE 2 |
| 244 |
|
| 245 |
#define TV_WINDOW_CLEAR 1 |
| 246 |
#define TV_WINDOW_UNMAP 2 |
| 247 |
#define TV_WINDOW_DRAW 4 |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
#define ENTRY_CLOSED (1<<0) |
| 271 |
#define ENTRY_HIDDEN (1<<1) |
| 272 |
#define ENTRY_NOT_LEAF (1<<2) |
| 273 |
#define ENTRY_MASK (ENTRY_CLOSED | ENTRY_HIDDEN) |
| 274 |
|
| 275 |
#define ENTRY_HAS_BUTTON (1<<3) |
| 276 |
#define ENTRY_ICON (1<<4) |
| 277 |
#define ENTRY_REDRAW (1<<5) |
| 278 |
#define ENTRY_LAYOUT_PENDING (1<<6) |
| 279 |
#define ENTRY_DATA_CHANGED (1<<7) |
| 280 |
#define ENTRY_DIRTY (ENTRY_DATA_CHANGED | ENTRY_LAYOUT_PENDING) |
| 281 |
|
| 282 |
#define BUTTON_AUTO (1<<8) |
| 283 |
#define BUTTON_SHOW (1<<9) |
| 284 |
#define BUTTON_MASK (BUTTON_AUTO | BUTTON_SHOW) |
| 285 |
#define ENTRY_ALTROW (1<<10) |
| 286 |
#define ENTRY_IS_TREE (1<<11) |
| 287 |
#define ENTRY_ONLYHIDDEN (1<<12) |
| 288 |
#define ENTRY_DATA_WINDOW (1<<13) |
| 289 |
#define ENTRY_WINDOW (1<<14) |
| 290 |
#define ENTRY_DELETED (1<<15) |
| 291 |
|
| 292 |
#define COLUMN_RULE_PICKED (1<<1) |
| 293 |
#define COLUMN_DIRTY (1<<2) |
| 294 |
#define COLUMN_DELETED (1<<3) |
| 295 |
|
| 296 |
#define STYLE_TEXTBOX (0) |
| 297 |
#define STYLE_COMBOBOX (1) |
| 298 |
#define STYLE_CHECKBOX (2) |
| 299 |
#define STYLE_WINDOWBOX (4) |
| 300 |
#define STYLE_BARBOX (8) |
| 301 |
#define STYLE_TYPE 0x15 |
| 302 |
|
| 303 |
#define STYLE_HIGHLIGHT (1<<10) |
| 304 |
#define STYLE_USER (1<<11) |
| 305 |
#define STYLE_LAYOUT (1<<12) |
| 306 |
#define STYLE_DIRTY (1<<13) |
| 307 |
|
| 308 |
#define STYLEFLAG_NOCLEAR (1<<0) |
| 309 |
#define STYLEFLAG_ALTSTYLE (1<<1) |
| 310 |
#define STYLEFLAG_EMPTYSTYLE (1<<2) |
| 311 |
#define STYLEFLAG_SUBSTYLE (1<<3) |
| 312 |
#define STYLEFLAG_TITLESTYLE (1<<4) |
| 313 |
|
| 314 |
|
| 315 |
typedef struct TreeViewColumnStruct TreeViewColumn; |
| 316 |
typedef struct TreeViewComboboxStruct TreeViewCombobox; |
| 317 |
typedef struct TreeViewEntryStruct TreeViewEntry; |
| 318 |
typedef struct TreeViewStruct TreeView; |
| 319 |
typedef struct TreeViewStyleClassStruct TreeViewStyleClass; |
| 320 |
typedef struct TreeViewStyleStruct TreeViewStyle; |
| 321 |
|
| 322 |
typedef int (TreeViewCompareProc) _ANSI_ARGS_((Tcl_Interp *interp, |
| 323 |
char *name, Tcl_Obj *pattern, int nocase)); |
| 324 |
|
| 325 |
typedef TreeViewEntry *(TreeViewIterProc) _ANSI_ARGS_((TreeViewEntry *entryPtr, |
| 326 |
unsigned int mask)); |
| 327 |
|
| 328 |
typedef struct { |
| 329 |
int init; |
| 330 |
int tagType; |
| 331 |
TreeView *tvPtr; |
| 332 |
Blt_HashSearch cursor; |
| 333 |
TreeViewEntry *entryPtr; |
| 334 |
char *tagName; |
| 335 |
Tcl_Obj **objv, *objPtr; |
| 336 |
int objc; |
| 337 |
int idx; |
| 338 |
int refCount; |
| 339 |
Blt_TreeTagEntry* tPtr; |
| 340 |
Blt_TreeNode node; |
| 341 |
unsigned int inode; |
| 342 |
} TreeViewTagInfo; |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
typedef struct TreeViewIconStruct { |
| 363 |
Tk_Image tkImage; |
| 364 |
|
| 365 |
int refCount; |
| 366 |
|
| 367 |
short int width, height; |
| 368 |
|
| 369 |
Blt_HashEntry *hashPtr; |
| 370 |
TreeView *tvPtr; |
| 371 |
int count; |
| 372 |
|
| 373 |
} *TreeViewIcon; |
| 374 |
|
| 375 |
#define TreeViewIconHeight(icon) ((icon)->height) |
| 376 |
#define TreeViewIconWidth(icon) ((icon)->width) |
| 377 |
#define TreeViewIconBits(icon) ((icon)->tkImage) |
| 378 |
struct TreeViewValueStruct; |
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
struct TreeViewColumnStruct { |
| 390 |
int type; |
| 391 |
Blt_TreeKey key; |
| 392 |
char *name; |
| 393 |
int position; |
| 394 |
|
| 395 |
|
| 396 |
UID tagsUid; |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
TreeView *tvPtr; |
| 402 |
unsigned int flags; |
| 403 |
|
| 404 |
|
| 405 |
char *title; |
| 406 |
|
| 407 |
|
| 408 |
Tk_Font titleFont; |
| 409 |
Shadow titleShadow; |
| 410 |
|
| 411 |
XColor *titleFgColor; |
| 412 |
|
| 413 |
Tk_3DBorder titleBorder; |
| 414 |
|
| 415 |
GC titleGC; |
| 416 |
GC textGC; |
| 417 |
|
| 418 |
XColor *activeTitleFgColor; |
| 419 |
|
| 420 |
XColor *fgColor; |
| 421 |
Tk_Font font; |
| 422 |
Tk_3DBorder activeTitleBorder; |
| 423 |
|
| 424 |
int titleBorderWidth; |
| 425 |
int titleRelief; |
| 426 |
|
| 427 |
GC activeTitleGC; |
| 428 |
|
| 429 |
TextLayout *titleTextPtr; |
| 430 |
short int titleWidth, titleHeight; |
| 431 |
|
| 432 |
TreeViewIcon titleIcon; |
| 433 |
char *titleCmd; |
| 434 |
|
| 435 |
|
| 436 |
char *sortCmd; |
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
int hidden; |
| 441 |
|
| 442 |
int state; |
| 443 |
|
| 444 |
int editable; |
| 445 |
|
| 446 |
|
| 447 |
int max; |
| 448 |
int reqMin, reqMax; |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
int reqWidth; |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
int maxWidth; |
| 461 |
|
| 462 |
|
| 463 |
int worldX; |
| 464 |
|
| 465 |
|
| 466 |
double weight; |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
int width; |
| 471 |
|
| 472 |
TreeViewStyle *stylePtr; |
| 473 |
|
| 474 |
Tk_3DBorder border; |
| 475 |
int borderWidth; |
| 476 |
int relief; |
| 477 |
Blt_Pad pad; |
| 478 |
|
| 479 |
|
| 480 |
Tk_Justify justify; |
| 481 |
|
| 482 |
|
| 483 |
Blt_ChainLink *linkPtr; |
| 484 |
|
| 485 |
int ruleLineWidth; |
| 486 |
Blt_Dashes ruleDashes; |
| 487 |
GC ruleGC; |
| 488 |
Blt_Tile tile; |
| 489 |
int scrollTile; |
| 490 |
|
| 491 |
|
| 492 |
int hasbg; |
| 493 |
int hasttlbg; |
| 494 |
struct TreeViewValueStruct * defValue; |
| 495 |
char *validCmd; |
| 496 |
char *editOpts; |
| 497 |
Tk_Justify titleJustify; |
| 498 |
|
| 499 |
short iX, iY, iW, iH; |
| 500 |
short tX, tY, tW, tH; |
| 501 |
int underline; |
| 502 |
Blt_TreeTrace trace; |
| 503 |
Tcl_Obj *fillCmd; |
| 504 |
TreeViewStyle *titleStylePtr; |
| 505 |
int drawArrow; |
| 506 |
int autoWidth; |
| 507 |
int sortType; |
| 508 |
|
| 509 |
Tcl_Obj *colorPats; |
| 510 |
Tcl_Obj *colorRegex; |
| 511 |
Tcl_Obj *formatCmd; |
| 512 |
Tcl_Obj *sortAltColumns; |
| 513 |
}; |
| 514 |
|
| 515 |
|
| 516 |
#define TREEVIEW_STYLE_COMMON \ |
| 517 |
int refCount; |
| 518 |
|
| 519 |
\ |
| 520 |
unsigned int flags; |
| 521 |
\ |
| 522 |
char *name; \ |
| 523 |
TreeViewStyleClass *classPtr; \ |
| 524 |
|
| 525 |
|
| 526 |
\ |
| 527 |
Blt_HashEntry *hashPtr; |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
\ |
| 533 |
\ |
| 534 |
Tk_Cursor cursor; \ |
| 535 |
TreeViewIcon icon; |
| 536 |
\ |
| 537 |
int gap; \ |
| 538 |
Tk_Font font; \ |
| 539 |
XColor *fgColor; \ |
| 540 |
Tk_3DBorder border; \ |
| 541 |
XColor *highlightFgColor; |
| 542 |
\ |
| 543 |
Tk_3DBorder highlightBorder; |
| 544 |
\ |
| 545 |
XColor *activeFgColor; \ |
| 546 |
Tk_3DBorder activeBorder; \ |
| 547 |
int priority; \ |
| 548 |
Blt_Tile tile; \ |
| 549 |
Blt_Tile fillTile; \ |
| 550 |
Shadow shadow; \ |
| 551 |
int hidden; \ |
| 552 |
GC gc; \ |
| 553 |
GC highlightGC; \ |
| 554 |
GC activeGC; \ |
| 555 |
int noteditable; \ |
| 556 |
char *editOpts; |
| 557 |
|
| 558 |
|
| 559 |
struct TreeViewStyleStruct { |
| 560 |
TREEVIEW_STYLE_COMMON |
| 561 |
}; |
| 562 |
|
| 563 |
typedef struct TreeViewValueStruct { |
| 564 |
TreeViewColumn *columnPtr; |
| 565 |
TreeViewEntry *entryPtr; |
| 566 |
short int width, height; |
| 567 |
TreeViewStyle *stylePtr; |
| 568 |
|
| 569 |
char *string; |
| 570 |
TextLayout *textPtr; |
| 571 |
struct TreeViewValueStruct *nextPtr; |
| 572 |
short iX, iY, iW, iH; |
| 573 |
short tX, tY, tW, tH; |
| 574 |
short selected; |
| 575 |
} TreeViewValue; |
| 576 |
|
| 577 |
typedef void (StyleConfigProc) _ANSI_ARGS_((TreeView *tvPtr, |
| 578 |
TreeViewStyle *stylePtr)); |
| 579 |
typedef void (StyleDrawProc) _ANSI_ARGS_((TreeView *tvPtr, Drawable drawable, |
| 580 |
TreeViewEntry *entryPtr, TreeViewValue *valuePtr, |
| 581 |
TreeViewStyle *stylePtr, TreeViewIcon icon, int x, int y)); |
| 582 |
typedef int (StyleEditProc) _ANSI_ARGS_((TreeView *tvPtr, |
| 583 |
TreeViewEntry *entryPtr, TreeViewValue *valuePtr, |
| 584 |
TreeViewStyle *stylePtr, int x, int y, int *retVal)); |
| 585 |
typedef void (StyleFreeProc) _ANSI_ARGS_((TreeView *tvPtr, |
| 586 |
TreeViewStyle *stylePtr)); |
| 587 |
typedef void (StyleMeasureProc) _ANSI_ARGS_((TreeView *tvPtr, |
| 588 |
TreeViewStyle *stylePtr, TreeViewValue *valuePtr)); |
| 589 |
typedef int (StylePickProc) _ANSI_ARGS_((TreeViewEntry *entryPtr, |
| 590 |
TreeViewValue *valuePtr, TreeViewStyle *stylePtr, int worldX, |
| 591 |
int worldY)); |
| 592 |
|
| 593 |
struct TreeViewStyleClassStruct { |
| 594 |
char *className; |
| 595 |
Blt_ConfigSpec *specsPtr; |
| 596 |
StyleConfigProc *configProc; |
| 597 |
StyleMeasureProc *measProc; |
| 598 |
|
| 599 |
StyleDrawProc *drawProc; |
| 600 |
StylePickProc *pickProc; |
| 601 |
|
| 602 |
|
| 603 |
StyleEditProc *editProc; |
| 604 |
StyleFreeProc *freeProc; |
| 605 |
}; |
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
struct TreeViewEntryStruct { |
| 615 |
Blt_TreeNode node; |
| 616 |
int worldX, worldY; |
| 617 |
|
| 618 |
|
| 619 |
short int width, height; |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
int reqHeight; |
| 624 |
|
| 625 |
|
| 626 |
int vertLineLength; |
| 627 |
|
| 628 |
|
| 629 |
int lineHeight; |
| 630 |
unsigned int flags; |
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
UID tagsUid; |
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
TreeView *tvPtr; |
| 639 |
|
| 640 |
UID openCmd, closeCmd; |
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
short int buttonX, buttonY; |
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
TreeViewIcon *icons; |
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
TreeViewIcon *activeIcons; |
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
short int iconWidth; |
| 665 |
short int iconHeight; |
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
TextLayout *textPtr; |
| 673 |
|
| 674 |
short int labelWidth; |
| 675 |
short int labelHeight; |
| 676 |
|
| 677 |
UID labelUid; |
| 678 |
|
| 679 |
Tk_Font font; |
| 680 |
|
| 681 |
char *fullName; |
| 682 |
|
| 683 |
int flatIndex; |
| 684 |
|
| 685 |
Tcl_Obj *dataObjPtr; |
| 686 |
|
| 687 |
XColor *color; |
| 688 |
|
| 689 |
GC gc; |
| 690 |
|
| 691 |
Shadow shadow; |
| 692 |
|
| 693 |
TreeViewValue *values; |
| 694 |
|
| 695 |
|
| 696 |
|
| 697 |
TreeViewStyle *stylePtr; |
| 698 |
int hide; |
| 699 |
int underline; |
| 700 |
Tk_3DBorder border; |
| 701 |
char *userData; |
| 702 |
TextLayout *subTextPtr; |
| 703 |
char *subLabel; |
| 704 |
TreeViewStyle *realStylePtr; |
| 705 |
int state; |
| 706 |
}; |
| 707 |
|
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
typedef struct { |
| 717 |
XColor *fgColor; |
| 718 |
|
| 719 |
Tk_3DBorder border; |
| 720 |
|
| 721 |
XColor *activeFgColor; |
| 722 |
|
| 723 |
Tk_3DBorder activeBorder; |
| 724 |
|
| 725 |
GC normalGC; |
| 726 |
GC activeGC; |
| 727 |
|
| 728 |
int reqSize; |
| 729 |
|
| 730 |
int borderWidth; |
| 731 |
|
| 732 |
int openRelief, closeRelief; |
| 733 |
|
| 734 |
int width, height; |
| 735 |
|
| 736 |
TreeViewIcon *icons; |
| 737 |
TreeViewIcon *activeicons; |
| 738 |
} TreeViewButton; |
| 739 |
|
| 740 |
|
| 741 |
|
| 742 |
|
| 743 |
|
| 744 |
typedef struct { |
| 745 |
int x; |
| 746 |
int iconWidth; |
| 747 |
int labelWidth; |
| 748 |
} LevelInfo; |
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
|
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
struct TreeViewStruct { |
| 770 |
Tcl_Interp *interp; |
| 771 |
|
| 772 |
Tcl_Command cmdToken; |
| 773 |
|
| 774 |
Blt_Tree tree; |
| 775 |
Blt_Tree freeTree; |
| 776 |
|
| 777 |
Blt_HashEntry *hashPtr; |
| 778 |
|
| 779 |
|
| 780 |
|
| 781 |
Tk_Window tkwin; |
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
|
| 786 |
Display *display; |
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
Blt_HashTable entryTable; |
| 792 |
|
| 793 |
|
| 794 |
Blt_HashTable columnTable; |
| 795 |
Blt_Chain *colChainPtr; |
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
unsigned int flags; |
| 800 |
|
| 801 |
int insetX, insetY; |
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
Tk_Font font; |
| 809 |
Tk_Font titleFont; |
| 810 |
XColor *fgColor; |
| 811 |
|
| 812 |
Tk_3DBorder border; |
| 813 |
|
| 814 |
|
| 815 |
int borderWidth; |
| 816 |
|
| 817 |
int relief; |
| 818 |
|
| 819 |
|
| 820 |
int highlightWidth; |
| 821 |
|
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
XColor *highlightBgColor; |
| 826 |
|
| 827 |
|
| 828 |
|
| 829 |
XColor *highlightColor; |
| 830 |
|
| 831 |
char *pathSep; |
| 832 |
|
| 833 |
char *trimLeft; |
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
int lineWidth; |
| 841 |
|
| 842 |
int dashes; |
| 843 |
|
| 844 |
XColor *lineColor; |
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
TreeViewButton button; |
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
int selRelief; |
| 864 |
|
| 865 |
|
| 866 |
int selBorderWidth; |
| 867 |
|
| 868 |
XColor *selInFocusFgColor; |
| 869 |
XColor *selOutFocusFgColor; |
| 870 |
|
| 871 |
Tk_3DBorder selInFocusBorder; |
| 872 |
Tk_3DBorder selOutFocusBorder; |
| 873 |
|
| 874 |
|
| 875 |
TreeViewEntry *selAnchorPtr; |
| 876 |
|
| 877 |
TreeViewEntry *selMarkPtr; |
| 878 |
TreeViewColumn *selAnchorCol; |
| 879 |
|
| 880 |
int selectMode; |
| 881 |
|
| 882 |
|
| 883 |
char *selectCmd; |
| 884 |
|
| 885 |
|
| 886 |
Blt_HashTable selectTable; |
| 887 |
|
| 888 |
|
| 889 |
Blt_Chain *selChainPtr; |
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
int leader; |
| 897 |
|
| 898 |
|
| 899 |
Tk_Cursor cursor; |
| 900 |
|
| 901 |
Tk_Cursor resizeCursor; |
| 902 |
|
| 903 |
int reqWidth, reqHeight; |
| 904 |
|
| 905 |
|
| 906 |
GC lineGC; |
| 907 |
|
| 908 |
|
| 909 |
XColor *disabledColor; |
| 910 |
GC disabledGC; |
| 911 |
XColor *focusColor; |
| 912 |
Tk_3DBorder disabledBorder; |
| 913 |
|
| 914 |
Blt_Dashes focusDashes; |
| 915 |
|
| 916 |
GC focusGC; |
| 917 |
|
| 918 |
|
| 919 |
Tk_Window comboWin; |
| 920 |
|
| 921 |
TreeViewEntry *activePtr; |
| 922 |
|
| 923 |
TreeViewEntry *focusPtr; |
| 924 |
|
| 925 |
TreeViewEntry *activeButtonPtr; |
| 926 |
|
| 927 |
TreeViewEntry *fromPtr; |
| 928 |
|
| 929 |
struct TreeViewValueStruct *activeValuePtr; |
| 930 |
|
| 931 |
int xScrollUnits, yScrollUnits; |
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
char *xScrollCmdPrefix, *yScrollCmdPrefix; |
| 936 |
|
| 937 |
int scrollMode; |
| 938 |
|
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
int worldWidth, worldHeight; |
| 946 |
|
| 947 |
int xOffset, yOffset; |
| 948 |
|
| 949 |
|
| 950 |
short int minHeight; |
| 951 |
|
| 952 |
|
| 953 |
short int titleHeight; |
| 954 |
|
| 955 |
LevelInfo *levelInfo; |
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
int scanAnchorX, scanAnchorY; |
| 961 |
|
| 962 |
int scanX, scanY; |
| 963 |
|
| 964 |
|
| 965 |
Blt_HashTable iconTable; |
| 966 |
|
| 967 |
Blt_HashTable uidTable; |
| 968 |
|
| 969 |
Blt_HashTable styleTable; |
| 970 |
|
| 971 |
TreeViewEntry *rootPtr; |
| 972 |
|
| 973 |
TreeViewEntry **visibleArr; |
| 974 |
|
| 975 |
int nVisible; |
| 976 |
|
| 977 |
int nEntries; |
| 978 |
int treeWidth; |
| 979 |
|
| 980 |
int buttonFlags; |
| 981 |
|
| 982 |
|
| 983 |
|
| 984 |
char *openCmd, *closeCmd; |
| 985 |
|
| 986 |
|
| 987 |
TreeViewIcon *icons; |
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
TreeViewIcon *activeIcons; |
| 993 |
|
| 994 |
|
| 995 |
|
| 996 |
|
| 997 |
TreeViewIcon *leafIcons; |
| 998 |
TreeViewIcon *activeLeafIcons; |
| 999 |
char *takeFocus; |
| 1000 |
|
| 1001 |
ClientData clientData; |
| 1002 |
|
| 1003 |
Blt_BindTable bindTable; |
| 1004 |
|
| 1005 |
Blt_HashTable entryTagTable; |
| 1006 |
Blt_HashTable buttonTagTable; |
| 1007 |
Blt_HashTable columnTagTable; |
| 1008 |
Blt_HashTable styleTagTable; |
| 1009 |
|
| 1010 |
TreeViewStyle *stylePtr; |
| 1011 |
|
| 1012 |
TreeViewColumn treeColumn; |
| 1013 |
|
| 1014 |
TreeViewColumn *activeColumnPtr; |
| 1015 |
TreeViewColumn *activeTitleColumnPtr; |
| 1016 |
|
| 1017 |
|
| 1018 |
TreeViewColumn *resizeColumnPtr; |
| 1019 |
|
| 1020 |
|
| 1021 |
int depth; |
| 1022 |
|
| 1023 |
int flatView; |
| 1024 |
|
| 1025 |
|
| 1026 |
TreeViewEntry **flatArr; |
| 1027 |
|
| 1028 |
char *sortField; |
| 1029 |
|
| 1030 |
int sortType; |
| 1031 |
|
| 1032 |
|
| 1033 |
char *sortCmd; |
| 1034 |
|
| 1035 |
int sortDecreasing; |
| 1036 |
|
| 1037 |
|
| 1038 |
int viewIsDecreasing; |
| 1039 |
|
| 1040 |
TreeViewColumn *sortColumnPtr; |
| 1041 |
|
| 1042 |
#ifdef notdef |
| 1043 |
Pixmap drawable; |
| 1044 |
|
| 1045 |
|
| 1046 |
|
| 1047 |
|
| 1048 |
short int drawWidth, drawHeight; |
| 1049 |
#endif |
| 1050 |
short int ruleAnchor, ruleMark; |
| 1051 |
|
| 1052 |
Blt_Pool entryPool; |
| 1053 |
Blt_Pool valuePool; |
| 1054 |
Blt_Tile tile; |
| 1055 |
int scrollTile; |
| 1056 |
|
| 1057 |
|
| 1058 |
int ruleWidth; |
| 1059 |
GC solidGC; |
| 1060 |
TreeViewStyle *altStylePtr; |
| 1061 |
|
| 1062 |
int nAbove; |
| 1063 |
TreeViewStyle *emptyStylePtr; |
| 1064 |
int inlineImg; |
| 1065 |
int openAnchor; |
| 1066 |
int insertFirst; |
| 1067 |
int actCol; |
| 1068 |
int actEntry; |
| 1069 |
int rootNodeNum; |
| 1070 |
Blt_TreeNode rootNode; |
| 1071 |
int reqMin; |
| 1072 |
Blt_HashTable winTable; |
| 1073 |
Blt_HashTable winCellTable; |
| 1074 |
char *styleCmd; |
| 1075 |
int hideStyleIcons; |
| 1076 |
int hideStyleText; |
| 1077 |
Blt_Tile selectTile; |
| 1078 |
int nextIdx; |
| 1079 |
int nextSubIdx; |
| 1080 |
int focusHeight; |
| 1081 |
int showFull; |
| 1082 |
TreeViewStyle *subStylePtr; |
| 1083 |
int titlePad; |
| 1084 |
int setFlatView; |
| 1085 |
char *treePath; |
| 1086 |
int levelPad; |
| 1087 |
TreeViewStyle **levelStyles; |
| 1088 |
Tcl_Obj *imageCmd; |
| 1089 |
Tcl_Obj *formatCmd; |
| 1090 |
Tk_OptionTable buttonOptions; |
| 1091 |
int noScroll; |
| 1092 |
int padX, padY; |
| 1093 |
}; |
| 1094 |
|
| 1095 |
|
| 1096 |
extern UID Blt_TreeViewGetUid _ANSI_ARGS_((TreeView *tvPtr, |
| 1097 |
CONST char *string)); |
| 1098 |
extern void Blt_TreeViewFreeUid _ANSI_ARGS_((TreeView *tvPtr, UID uid)); |
| 1099 |
|
| 1100 |
extern void Blt_TreeViewEventuallyRedraw _ANSI_ARGS_((TreeView *tvPtr)); |
| 1101 |
extern Tcl_ObjCmdProc Blt_TreeViewWidgetInstCmd; |
| 1102 |
extern TreeViewEntry *Blt_TreeViewNearestEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1103 |
int x, int y, int flags)); |
| 1104 |
extern char *Blt_TreeViewGetFullName _ANSI_ARGS_((TreeView *tvPtr, |
| 1105 |
TreeViewEntry *entryPtr, int checkEntryLabel, Tcl_DString *dsPtr)); |
| 1106 |
extern void Blt_TreeViewSelectCmdProc _ANSI_ARGS_((ClientData clientData)); |
| 1107 |
extern void Blt_TreeViewInsertText _ANSI_ARGS_((TreeView *tvPtr, |
| 1108 |
TreeViewEntry *entryPtr, char *string, int extra, int insertPos)); |
| 1109 |
extern int Blt_TreeViewComputeLayout _ANSI_ARGS_((TreeView *tvPtr)); |
| 1110 |
extern void Blt_TreeViewPercentSubst _ANSI_ARGS_((TreeView *tvPtr, |
| 1111 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr, |
| 1112 |
char *command, char *value, Tcl_DString *resultPtr)); |
| 1113 |
extern int Blt_TreeViewDrawButton _ANSI_ARGS_((TreeView *tvPtr, |
| 1114 |
TreeViewEntry *entryPtr, Drawable drawable, int x, int y)); |
| 1115 |
extern void Blt_TreeViewDrawValue _ANSI_ARGS_((TreeView *tvPtr, |
| 1116 |
TreeViewEntry *entryPtr, TreeViewValue *valuePtr, Drawable drawable, |
| 1117 |
int x, int y, int altRow, int ishid)); |
| 1118 |
extern void Blt_TreeViewDrawOuterBorders _ANSI_ARGS_((TreeView *tvPtr, |
| 1119 |
Drawable drawable)); |
| 1120 |
extern int Blt_TreeViewDrawIcon _ANSI_ARGS_((TreeView *tvPtr, |
| 1121 |
TreeViewEntry *entryPtr, Drawable drawable, int x, int y, int clear)); |
| 1122 |
extern void Blt_TreeViewDrawHeadings _ANSI_ARGS_((TreeView *tvPtr, |
| 1123 |
Drawable drawable)); |
| 1124 |
extern void Blt_TreeViewDrawRule _ANSI_ARGS_((TreeView *tvPtr, |
| 1125 |
TreeViewColumn *columnPtr, Drawable drawable)); |
| 1126 |
extern int Blt_TreeViewTextbox _ANSI_ARGS_((TreeView *tvPtr, |
| 1127 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1128 |
|
| 1129 |
extern void Blt_TreeViewConfigureButtons _ANSI_ARGS_((TreeView *tvPtr)); |
| 1130 |
extern int Blt_TreeViewUpdateWidget _ANSI_ARGS_((Tcl_Interp *interp, |
| 1131 |
TreeView *tvPtr)); |
| 1132 |
extern int Blt_TreeViewScreenToIndex _ANSI_ARGS_((TreeView *tvPtr, |
| 1133 |
int x, int y)); |
| 1134 |
|
| 1135 |
extern void Blt_TreeViewFreeIcon _ANSI_ARGS_((TreeView *tvPtr, |
| 1136 |
TreeViewIcon icon)); |
| 1137 |
extern TreeViewIcon Blt_TreeViewGetIcon _ANSI_ARGS_((TreeView *tvPtr, |
| 1138 |
CONST char *iconName)); |
| 1139 |
extern void Blt_TreeViewAddValue _ANSI_ARGS_((TreeViewEntry *entryPtr, |
| 1140 |
TreeViewColumn *columnPtr)); |
| 1141 |
extern int Blt_TreeViewCreateColumn _ANSI_ARGS_((TreeView *tvPtr, |
| 1142 |
TreeViewColumn *columnPtr, char *name, char *defaultLabel)); |
| 1143 |
extern void Blt_TreeViewDestroyValue _ANSI_ARGS_((TreeView *tvPtr, |
| 1144 |
TreeViewEntry *entryPtr, TreeViewValue *valuePtr)); |
| 1145 |
extern void Blt_TreeViewDeleteValue(TreeViewEntry* entryPtr, Blt_TreeKey key); |
| 1146 |
extern TreeViewValue *Blt_TreeViewFindValue _ANSI_ARGS_(( |
| 1147 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1148 |
extern void Blt_TreeViewConfigureColumns _ANSI_ARGS_((TreeView *tvPtr)); |
| 1149 |
extern void Blt_TreeViewDestroyColumns _ANSI_ARGS_((TreeView *tvPtr)); |
| 1150 |
extern void Blt_TreeViewAllocateColumnUids _ANSI_ARGS_((TreeView *tvPtr)); |
| 1151 |
extern void Blt_TreeViewFreeColumnUids _ANSI_ARGS_((TreeView *tvPtr)); |
| 1152 |
extern void Blt_TreeViewUpdateColumnGCs _ANSI_ARGS_((TreeView *tvPtr, |
| 1153 |
TreeViewColumn *columnPtr)); |
| 1154 |
extern TreeViewColumn *Blt_TreeViewNearestColumn _ANSI_ARGS_((TreeView *tvPtr, |
| 1155 |
int x, int y, ClientData *contextPtr)); |
| 1156 |
|
| 1157 |
extern void Blt_TreeViewDrawRule _ANSI_ARGS_((TreeView *tvPtr, |
| 1158 |
TreeViewColumn *columnPtr, Drawable drawable)); |
| 1159 |
extern int Blt_TreeViewTextOp _ANSI_ARGS_((TreeView *tvPtr, Tcl_Interp *interp, |
| 1160 |
int objc, Tcl_Obj *CONST *objv)); |
| 1161 |
extern int Blt_TreeViewCombobox _ANSI_ARGS_((TreeView *tvPtr, |
| 1162 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1163 |
extern int Blt_TreeViewCreateEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1164 |
Blt_TreeNode node, int objc, Tcl_Obj *CONST *objv, int flags)); |
| 1165 |
extern int Blt_TreeViewConfigureEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1166 |
TreeViewEntry *entryPtr, int objc, Tcl_Obj *CONST *objv, int flags)); |
| 1167 |
extern int Blt_TreeViewOpenEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1168 |
TreeViewEntry *entryPtr)); |
| 1169 |
extern int Blt_TreeViewCloseEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1170 |
TreeViewEntry *entryPtr)); |
| 1171 |
extern TreeViewEntry *Blt_TreeViewNextEntry _ANSI_ARGS_(( |
| 1172 |
TreeViewEntry *entryPtr, unsigned int mask)); |
| 1173 |
extern TreeViewEntry *Blt_TreeViewPrevEntry _ANSI_ARGS_(( |
| 1174 |
TreeViewEntry *entryPtr, unsigned int mask)); |
| 1175 |
extern int Blt_TreeViewGetEntry _ANSI_ARGS_((TreeView *tvPtr, Tcl_Obj *objPtr, |
| 1176 |
TreeViewEntry **entryPtrPtr)); |
| 1177 |
extern int Blt_TreeViewEntryIsHidden _ANSI_ARGS_((TreeViewEntry *entryPtr)); |
| 1178 |
extern int Blt_TreeViewEntryIsMapped _ANSI_ARGS_((TreeViewEntry *entryPtr)); |
| 1179 |
extern TreeViewEntry *Blt_TreeViewNextSibling _ANSI_ARGS_(( |
| 1180 |
TreeViewEntry *entryPtr, unsigned int mask)); |
| 1181 |
extern TreeViewEntry *Blt_TreeViewPrevSibling _ANSI_ARGS_(( |
| 1182 |
TreeViewEntry *entryPtr, unsigned int mask)); |
| 1183 |
extern TreeViewEntry *Blt_TreeViewFirstChild _ANSI_ARGS_(( |
| 1184 |
TreeViewEntry *parentPtr, unsigned int mask)); |
| 1185 |
extern TreeViewEntry *Blt_TreeViewLastChild _ANSI_ARGS_(( |
| 1186 |
TreeViewEntry *entryPtr, unsigned int mask)); |
| 1187 |
extern TreeViewEntry *Blt_TreeViewParentEntry _ANSI_ARGS_(( |
| 1188 |
TreeViewEntry *entryPtr)); |
| 1189 |
|
| 1190 |
typedef int (TreeViewApplyProc) _ANSI_ARGS_((TreeView *tvPtr, |
| 1191 |
TreeViewEntry *entryPtr)); |
| 1192 |
|
| 1193 |
extern int Blt_TreeViewApply _ANSI_ARGS_((TreeView *tvPtr, |
| 1194 |
TreeViewEntry *entryPtr, TreeViewApplyProc *proc, unsigned int mask)); |
| 1195 |
|
| 1196 |
extern int Blt_TreeViewColumnOp _ANSI_ARGS_((TreeView *tvPtr, |
| 1197 |
Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv)); |
| 1198 |
extern int Blt_TreeViewSortOp _ANSI_ARGS_((TreeView *tvPtr, Tcl_Interp *interp, |
| 1199 |
int objc, Tcl_Obj *CONST *objv)); |
| 1200 |
extern int Blt_TreeViewGetColumn _ANSI_ARGS_((Tcl_Interp *interp, |
| 1201 |
TreeView *tvPtr, Tcl_Obj *objPtr, TreeViewColumn **columnPtrPtr)); |
| 1202 |
extern int Blt_TreeViewGetColumnKey _ANSI_ARGS_((Tcl_Interp *interp, |
| 1203 |
TreeView *tvPtr, Tcl_Obj *objPtr, TreeViewColumn **columnPtrPtr, char **keyPtrPtr)); |
| 1204 |
|
| 1205 |
extern void Blt_TreeViewSortFlatView _ANSI_ARGS_((TreeView *tvPtr)); |
| 1206 |
extern void Blt_TreeViewSortTreeView _ANSI_ARGS_((TreeView *tvPtr)); |
| 1207 |
|
| 1208 |
extern int Blt_TreeViewEntryIsSelected _ANSI_ARGS_((TreeView *tvPtr, |
| 1209 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1210 |
extern void Blt_TreeViewSelectEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1211 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1212 |
extern void Blt_TreeViewDeselectEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1213 |
TreeViewEntry *entryPtr, TreeViewColumn *columnPtr)); |
| 1214 |
extern void Blt_TreeViewPruneSelection _ANSI_ARGS_((TreeView *tvPtr, |
| 1215 |
TreeViewEntry *entryPtr)); |
| 1216 |
extern void Blt_TreeViewClearSelection _ANSI_ARGS_((TreeView *tvPtr)); |
| 1217 |
extern void Blt_TreeViewClearTags _ANSI_ARGS_((TreeView *tvPtr, |
| 1218 |
TreeViewEntry *entryPtr)); |
| 1219 |
extern int Blt_TreeViewFindTaggedEntries _ANSI_ARGS_((TreeView *tvPtr, |
| 1220 |
Tcl_Obj *objPtr, TreeViewTagInfo *infoPtr)); |
| 1221 |
extern int Blt_TreeViewDoneTaggedEntries _ANSI_ARGS_((TreeViewTagInfo *infoPtr)); |
| 1222 |
extern TreeViewEntry *Blt_TreeViewFirstTaggedEntry _ANSI_ARGS_(( |
| 1223 |
TreeViewTagInfo *infoPtr)); |
| 1224 |
extern TreeViewEntry *Blt_TreeViewNextTaggedEntry _ANSI_ARGS_(( |
| 1225 |
TreeViewTagInfo *infoPtr)); |
| 1226 |
extern ClientData Blt_TreeViewButtonTag _ANSI_ARGS_((TreeView *tvPtr, |
| 1227 |
CONST char *string)); |
| 1228 |
extern ClientData Blt_TreeViewEntryTag _ANSI_ARGS_((TreeView *tvPtr, |
| 1229 |
CONST char *string)); |
| 1230 |
extern ClientData Blt_TreeViewColumnTag _ANSI_ARGS_((TreeView *tvPtr, |
| 1231 |
CONST char *string)); |
| 1232 |
extern void Blt_TreeViewGetTags _ANSI_ARGS_((Tcl_Interp *interp, |
| 1233 |
TreeView *tvPtr, TreeViewEntry *entryPtr, Blt_List list)); |
| 1234 |
extern void Blt_TreeViewTraceColumn _ANSI_ARGS_((TreeView *tvPtr, |
| 1235 |
TreeViewColumn *columnPtr)); |
| 1236 |
extern TreeViewIcon Blt_TreeViewGetEntryIcon _ANSI_ARGS_((TreeView *tvPtr, |
| 1237 |
TreeViewEntry *entryPtr)); |
| 1238 |
extern int Blt_TreeViewStyleIsFmt _ANSI_ARGS_((TreeView *tvPtr, |
| 1239 |
TreeViewStyle *stylePtr)); |
| 1240 |
extern void Blt_TreeViewSetStyleIcon _ANSI_ARGS_((TreeView *tvPtr, |
| 1241 |
TreeViewStyle *stylePtr, TreeViewIcon icon)); |
| 1242 |
extern int Blt_TreeViewGetStyle _ANSI_ARGS_((Tcl_Interp *interp, |
| 1243 |
TreeView *tvPtr, char *styleName, TreeViewStyle **stylePtrPtr)); |
| 1244 |
extern int Blt_TreeViewGetStyleMake _ANSI_ARGS_((Tcl_Interp *interp, |
| 1245 |
TreeView *tvPtr, char *styleName, TreeViewStyle **stylePtrPtr, |
| 1246 |
TreeViewColumn *columnPtr, TreeViewEntry *entryPtr, TreeViewValue *valuePtr)); |
| 1247 |
extern void Blt_TreeViewFreeStyle _ANSI_ARGS_((TreeView *tvPtr, |
| 1248 |
TreeViewStyle *stylePtr)); |
| 1249 |
extern TreeViewStyle *Blt_TreeViewCreateStyle _ANSI_ARGS_((Tcl_Interp *interp, |
| 1250 |
TreeView *tvPtr, int type, char *styleName)); |
| 1251 |
extern void Blt_TreeViewUpdateStyleGCs _ANSI_ARGS_((TreeView *tvPtr, |
| 1252 |
TreeViewStyle *stylePtr)); |
| 1253 |
extern void Blt_TreeViewUpdateStyles _ANSI_ARGS_((TreeView *tvPtr)); |
| 1254 |
extern Tk_3DBorder Blt_TreeViewGetStyleBorder _ANSI_ARGS_((TreeView *tvPtr, |
| 1255 |
TreeViewStyle *stylePtr)); |
| 1256 |
extern GC Blt_TreeViewGetStyleGC _ANSI_ARGS_((TreeView *tvPtr,TreeViewStyle *stylePtr)); |
| 1257 |
extern Tk_Font Blt_TreeViewGetStyleFont _ANSI_ARGS_((TreeView *tvPtr, |
| 1258 |
TreeViewColumn *columnPtr, TreeViewStyle *stylePtr)); |
| 1259 |
extern XColor *Blt_TreeViewGetStyleFg _ANSI_ARGS_((TreeView *tvPtr, |
| 1260 |
TreeViewColumn *columnPtr, TreeViewStyle *stylePtr)); |
| 1261 |
extern TreeViewEntry *Blt_NodeToEntry _ANSI_ARGS_((TreeView *tvPtr, |
| 1262 |
Blt_TreeNode node)); |
| 1263 |
extern int Blt_TreeViewStyleOp _ANSI_ARGS_((TreeView *tvPtr, Tcl_Interp *interp, |
| 1264 |
int objc, Tcl_Obj *CONST *objv)); |
| 1265 |
extern void Blt_TreeViewTileChangedProc( ClientData clientData, Blt_Tile tile); |
| 1266 |
extern void Blt_TreeViewMakeStyleDirty( TreeView *tvPtr ); |
| 1267 |
TreeViewValue * Blt_TreeViewMakeValue(TreeView *tvPtr, TreeViewColumn *columnPtr, TreeViewEntry *entryPtr); |
| 1268 |
void Blt_TreeViewRelayout(TreeView *tvPtr); |
| 1269 |
extern void Blt_TreeViewFill3DTile _ANSI_ARGS_((TreeView *tvPtr, |
| 1270 |
Drawable drawable, Tk_3DBorder border, int x, int y, int width, int height, |
| 1271 |
int borderWidth, int relief, Blt_Tile tile, int scrollTile, int flags)); |
| 1272 |
extern int Blt_TreeViewIsLeaf(TreeViewEntry *entryPtr); |
| 1273 |
extern void Blt_TreeViewFreeWindows( TreeView *tvPtr); |
| 1274 |
extern void Blt_TreeViewMarkWindows( TreeView *tvPtr, int flag); |
| 1275 |
extern void Blt_TreeViewWindowUpdate(TreeViewEntry *entryPtr, TreeViewColumn *columnPtr); |
| 1276 |
extern void Blt_TreeViewWindowRelease(TreeViewEntry *entryPtr, TreeViewColumn *columnPtr); |
| 1277 |
extern void Blt_TreeViewColumnRekey(TreeView *tvPtr); |
| 1278 |
extern void Blt_TreeViewChanged(TreeView *tvPtr); |
| 1279 |
extern int Blt_TreeViewRerawIcon(TreeView *tvPtr, TreeViewEntry *entryPtr, |
| 1280 |
TreeViewColumn *columnPtr, TreeViewIcon icon, int imageX, |
| 1281 |
int imageY, int width, int height, Drawable drawable, |
| 1282 |
int drawableX, int drawableY); |
| 1283 |
|
| 1284 |
extern void Blt_GetPriorityStyle _ANSI_ARGS_(( TreeViewStyle *stylePtr, |
| 1285 |
TreeView *tvPtr, TreeViewColumn *columnPtr, TreeViewEntry *entryPtr, |
| 1286 |
TreeViewValue *valuePtr, TreeViewStyle *inStylePtr, int flags)); |
| 1287 |
extern int Blt_TreeViewRedrawIcon _ANSI_ARGS_((TreeView *tvPtr, TreeViewEntry *entryPtr, |
| 1288 |
TreeViewColumn *columnPtr, TreeViewIcon icon, int imageX, |
| 1289 |
int imageY, int width, int height, Drawable drawable, |
| 1290 |
int drawableX, int drawableY)); |
| 1291 |
void Blt_TreeViewFreeEntry _ANSI_ARGS_((TreeView *tvPtr, TreeViewEntry *entryPtr)); |
| 1292 |
|
| 1293 |
#define CHOOSE(default, override) \ |
| 1294 |
(((override) == NULL) ? (default) : (override)) |
| 1295 |
|
| 1296 |
#define CHOOSE3(default, override2, override1) \ |
| 1297 |
(((override1) == NULL) ? (CHOOSE(default, override2)) : (override1)) |
| 1298 |
|
| 1299 |
#define CHOOSE4(default, override3, override2, override1) \ |
| 1300 |
(((override1) == NULL) ? (CHOOSE3(default, override3, override2)) : (override1)) |
| 1301 |
|
| 1302 |
#define GETLABEL(e) \ |
| 1303 |
(((e)->labelUid != NULL) ? (e)->labelUid : Blt_TreeNodeLabel((e)->node)) |
| 1304 |
|
| 1305 |
#define Blt_TreeViewGetData(entryPtr, key, objPtrPtr) \ |
| 1306 |
Blt_TreeGetValueByKey((Tcl_Interp *)NULL, (entryPtr)->tvPtr->tree, \ |
| 1307 |
(entryPtr)->node, key, objPtrPtr) |
| 1308 |
|
| 1309 |
extern Blt_CustomOption bltTreeViewUidOption; |
| 1310 |
extern Blt_CustomOption bltTreeViewIconOption; |
| 1311 |
extern Blt_CustomOption bltTreeViewStyleOption; |
| 1312 |
extern Blt_CustomOption bltTreeViewStylesOption; |
| 1313 |
extern Blt_CustomOption bltTreeViewTreeOption; |
| 1314 |
extern Blt_CustomOption bltTreeViewColumnOption; |
| 1315 |
extern Blt_CustomOption bltTreeViewLabelOption; |
| 1316 |
extern Blt_CustomOption bltTreeViewDataOption; |
| 1317 |
extern void Blt_TreeViewOptsInit(TreeView* tvPtr); |
| 1318 |
|
| 1319 |
|
| 1320 |
|
| 1321 |
#endif |