~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/editors/include/UI_interface.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: UI_interface.h 30325 2010-07-14 14:11:03Z jwilkins $
3
 
 *
 
1
/*
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
27
25
 * ***** END GPL LICENSE BLOCK *****
28
26
 */
29
27
 
30
 
#ifndef UI_INTERFACE_H
31
 
#define UI_INTERFACE_H
32
 
 
 
28
/** \file UI_interface.h
 
29
 *  \ingroup editorui
 
30
 */
 
31
 
 
32
#ifndef __UI_INTERFACE_H__
 
33
#define __UI_INTERFACE_H__
 
34
 
 
35
#include "BLO_sys_types.h" /* size_t */
33
36
#include "RNA_types.h"
 
37
#include "DNA_userdef_types.h"
34
38
 
35
39
/* Struct Declarations */
36
40
 
44
48
struct wmOperator;
45
49
struct AutoComplete;
46
50
struct bContext;
 
51
struct bContextStore;
47
52
struct Panel;
48
53
struct PanelType;
49
54
struct PointerRNA;
58
63
struct CurveMapping;
59
64
struct Image;
60
65
struct ImageUser;
 
66
struct wmOperatorType;
61
67
struct uiWidgetColors;
62
68
struct Tex;
63
69
struct MTex;
64
70
struct ImBuf;
 
71
struct bNodeTree;
 
72
struct bNode;
 
73
struct bNodeSocket;
65
74
 
66
75
typedef struct uiBut uiBut;
67
76
typedef struct uiBlock uiBlock;
70
79
 
71
80
/* Defines */
72
81
 
 
82
/* names */
 
83
#define UI_MAX_DRAW_STR 400
 
84
#define UI_MAX_NAME_STR 128
 
85
 
73
86
/* uiBlock->dt */
74
87
#define UI_EMBOSS               0       /* use widget style for drawing */
75
88
#define UI_EMBOSSN              1       /* Nothing, only icon and/or text */
77
90
#define UI_EMBOSST              3       /* Table */
78
91
 
79
92
/* uiBlock->direction */
 
93
#define UI_DIRECTION    (UI_TOP|UI_DOWN|UI_LEFT|UI_RIGHT)
80
94
#define UI_TOP          1
81
95
#define UI_DOWN         2
82
96
#define UI_LEFT         4
83
97
#define UI_RIGHT        8
84
 
#define UI_DIRECTION    15
 
98
 
85
99
#define UI_CENTER               16
86
100
#define UI_SHIFT_FLIPPED        32
87
101
 
88
102
/* uiBlock->autofill (not yet used) */
89
 
#define UI_BLOCK_COLLUMNS       1
90
 
#define UI_BLOCK_ROWS           2
 
103
// #define UI_BLOCK_COLLUMNS    1
 
104
// #define UI_BLOCK_ROWS                2
91
105
 
92
106
/* uiBlock->flag (controls) */
93
107
#define UI_BLOCK_LOOP                   1
94
108
#define UI_BLOCK_REDRAW                 2
95
109
#define UI_BLOCK_RET_1                  4               /* XXX 2.5 not implemented */
96
110
#define UI_BLOCK_NUMSELECT              8
97
 
#define UI_BLOCK_ENTER_OK               16
98
 
#define UI_BLOCK_NOSHADOW               32
99
 
#define UI_BLOCK_UNUSED                 64
 
111
/*#define UI_BLOCK_ENTER_OK             16*/ /*UNUSED*/
 
112
#define UI_BLOCK_CLIPBOTTOM             32
 
113
#define UI_BLOCK_CLIPTOP                64
100
114
#define UI_BLOCK_MOVEMOUSE_QUIT 128
101
115
#define UI_BLOCK_KEEP_OPEN              256
102
116
#define UI_BLOCK_POPUP                  512
103
117
#define UI_BLOCK_OUT_1                  1024
104
118
#define UI_BLOCK_NO_FLIP                2048
105
119
#define UI_BLOCK_POPUP_MEMORY   4096
 
120
#define UI_BLOCK_CLIP_EVENTS    8192    /* stop handling mouse events */
106
121
 
107
122
/* uiPopupBlockHandle->menuretval */
108
123
#define UI_RETURN_CANCEL        1       /* cancel all menus cascading */
109
124
#define UI_RETURN_OK        2       /* choice made */
110
125
#define UI_RETURN_OUT       4       /* left the menu */
111
126
#define UI_RETURN_UPDATE    8       /* update the button that opened */
 
127
#define UI_RETURN_POPUP_OK  16      /* popup is ok to be handled */
112
128
 
113
129
        /* block->flag bits 12-15 are identical to but->flag bits */
114
130
 
115
131
/* panel controls */
116
 
#define UI_PNL_TRANSP   1
117
132
#define UI_PNL_SOLID    2
118
 
 
119
133
#define UI_PNL_CLOSE    32
120
 
#define UI_PNL_STOW             64
121
 
#define UI_PNL_TO_MOUSE 128
122
 
#define UI_PNL_UNSTOW   256
123
134
#define UI_PNL_SCALE    512
124
135
 
125
136
/* warning the first 6 flags are internal */
128
139
#define UI_ICON_LEFT    128
129
140
#define UI_ICON_SUBMENU 256
130
141
#define UI_ICON_PREVIEW 512
131
 
        /* control for button type block */
132
 
#define UI_MAKE_TOP             1024
133
 
#define UI_MAKE_DOWN    2048
134
 
#define UI_MAKE_LEFT    4096
135
 
#define UI_MAKE_RIGHT   8192
 
142
 
 
143
#define UI_TEXT_RIGHT           1024
 
144
#define UI_BUT_NODE_LINK        2048
 
145
#define UI_BUT_NODE_ACTIVE      4096
 
146
#define UI_FLAG_UNUSED          8192
136
147
 
137
148
        /* button align flag, for drawing groups together */
138
 
#define UI_BUT_ALIGN            (15<<14)
 
149
#define UI_BUT_ALIGN            (UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT|UI_BUT_ALIGN_DOWN)
139
150
#define UI_BUT_ALIGN_TOP        (1<<14)
140
151
#define UI_BUT_ALIGN_LEFT       (1<<15)
141
152
#define UI_BUT_ALIGN_RIGHT      (1<<16)
146
157
#define UI_BUT_ANIMATED         (1<<20)
147
158
#define UI_BUT_ANIMATED_KEY     (1<<21)
148
159
#define UI_BUT_DRIVEN           (1<<22)
149
 
#define UI_BUT_INACTIVE         (1<<23)
150
 
#define UI_BUT_LAST_ACTIVE      (1<<24)
151
 
#define UI_BUT_UNDO                     (1<<25)
152
 
#define UI_BUT_IMMEDIATE        (1<<26)
153
 
#define UI_BUT_NO_TOOLTIP       (1<<27)
 
160
#define UI_BUT_REDALERT         (1<<23)
 
161
#define UI_BUT_INACTIVE         (1<<24)
 
162
#define UI_BUT_LAST_ACTIVE      (1<<25)
 
163
#define UI_BUT_UNDO                     (1<<26)
 
164
#define UI_BUT_IMMEDIATE        (1<<27)
 
165
#define UI_BUT_NO_TOOLTIP       (1<<28)
 
166
#define UI_BUT_NO_UTF8          (1<<29)
154
167
 
155
 
#define UI_BUT_VEC_SIZE_LOCK (1<<28) /* used to flag if color hsv-circle should keep luminance */
156
 
#define UI_BUT_COLOR_CUBIC      (1<<29) /* cubic saturation for the color wheel */
 
168
#define UI_BUT_VEC_SIZE_LOCK (1<<30) /* used to flag if color hsv-circle should keep luminance */
 
169
#define UI_BUT_COLOR_CUBIC      (1<<31) /* cubic saturation for the color wheel */
157
170
 
158
171
#define UI_PANEL_WIDTH                  340
159
172
#define UI_COMPACT_PANEL_WIDTH  160
160
173
 
 
174
/* scale fixed button widths by this to account for DPI
 
175
 * 8.4852 == sqrtf(72.0f)) */
 
176
#define UI_DPI_FAC (sqrtf((float)U.dpi) / 8.48528137423857f)
 
177
#define UI_DPI_ICON_FAC (((float)U.dpi) / 72.0f)
 
178
/* 16 to copy ICON_DEFAULT_HEIGHT */
 
179
#define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_ICON_FAC)
 
180
 
161
181
/* Button types, bits stored in 1 value... and a short even!
162
 
- bits 0-4:  bitnr (0-31)
163
 
- bits 5-7:  pointer type
164
 
- bit  8:    for 'bit'
165
 
- bit  9-15: button type (now 6 bits, 64 types)
166
 
*/
 
182
 * - bits 0-4:  bitnr (0-31)
 
183
 * - bits 5-7:  pointer type
 
184
 * - bit  8:    for 'bit'
 
185
 * - bit  9-15: button type (now 6 bits, 64 types)
 
186
 * */
167
187
 
168
188
#define CHA     32
169
189
#define SHO     64
170
190
#define INT     96
171
191
#define FLO     128
172
 
#define FUN     192
 
192
/*#define FUN   192*/ /*UNUSED*/
173
193
#define BIT     256
174
194
 
175
195
#define BUTPOIN (128+64+32)
213
233
#define TOGBUT          (37<<9)
214
234
#define OPTION          (38<<9)
215
235
#define OPTIONN         (39<<9)
216
 
#define SEARCH_MENU     (40<<9)
217
 
#define BUT_EXTRA       (41<<9)
218
 
#define HSVCIRCLE       (42<<9)
219
 
#define LISTBOX         (43<<9)
220
 
#define LISTROW         (44<<9)
221
 
#define HOTKEYEVT       (45<<9)
222
 
#define BUT_IMAGE       (46<<9)
223
 
#define HISTOGRAM       (47<<9)
224
 
#define WAVEFORM        (48<<9)
225
 
#define VECTORSCOPE     (49<<9)
226
 
#define PROGRESSBAR     (50<<9)
 
236
#define TRACKPREVIEW    (40<<9)
 
237
                /* buttons with value >= SEARCH_MENU don't get undo pushes */
 
238
#define SEARCH_MENU     (41<<9)
 
239
#define BUT_EXTRA       (42<<9)
 
240
#define HSVCIRCLE       (43<<9)
 
241
#define LISTBOX         (44<<9)
 
242
#define LISTROW         (45<<9)
 
243
#define HOTKEYEVT       (46<<9)
 
244
#define BUT_IMAGE       (47<<9)
 
245
#define HISTOGRAM       (48<<9)
 
246
#define WAVEFORM        (49<<9)
 
247
#define VECTORSCOPE     (50<<9)
 
248
#define PROGRESSBAR     (51<<9)
227
249
 
228
250
#define BUTTYPE         (63<<9)
229
251
 
247
269
void uiSetRoundBox(int type);
248
270
int uiGetRoundBox(void);
249
271
void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad);
250
 
void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag, short direction);
251
272
void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy);
 
273
void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float rad);
 
274
void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown);
 
275
void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight);
252
276
 
253
277
/* state for scrolldrawing */
254
278
#define UI_SCROLL_PRESSED               1
256
280
#define UI_SCROLL_NO_OUTLINE    4
257
281
void uiWidgetScrollDraw(struct uiWidgetColors *wcol, struct rcti *rect, struct rcti *slider, int state);
258
282
 
 
283
/* Callbacks
 
284
 *
 
285
 * uiBlockSetHandleFunc/ButmFunc are for handling events through a callback.
 
286
 * HandleFunc gets the retval passed on, and ButmFunc gets a2. The latter is
 
287
 * mostly for compatibility with older code.
 
288
 *
 
289
 * uiButSetCompleteFunc is for tab completion.
 
290
 *
 
291
 * uiButSearchFunc is for name buttons, showing a popup with matches
 
292
 *
 
293
 * uiBlockSetFunc and uiButSetFunc are callbacks run when a button is used,
 
294
 * in case events, operators or RNA are not sufficient to handle the button.
 
295
 *
 
296
 * uiButSetNFunc will free the argument with MEM_freeN. */
 
297
 
 
298
typedef struct uiSearchItems uiSearchItems;
 
299
 
 
300
typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
 
301
typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
 
302
typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
 
303
typedef void (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
 
304
typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items);
 
305
typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
 
306
 
259
307
/* Menu Callbacks */
260
308
 
261
309
typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1);
265
313
 *
266
314
 * Functions used to create popup menus. For more extended menus the
267
315
 * uiPupMenuBegin/End functions can be used to define own items with
268
 
 * the uiItem functions inbetween. If it is a simple confirmation menu
 
316
 * the uiItem functions in between. If it is a simple confirmation menu
269
317
 * or similar, popups can be created with a single function call. */
270
318
 
271
319
typedef struct uiPopupMenu uiPopupMenu;
274
322
void uiPupMenuEnd(struct bContext *C, struct uiPopupMenu *head);
275
323
struct uiLayout *uiPupMenuLayout(uiPopupMenu *head);
276
324
 
277
 
void uiPupMenuOkee(struct bContext *C, char *opname, char *str, ...);
278
 
void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, char *filename);
279
 
void uiPupMenuNotice(struct bContext *C, char *str, ...);
280
 
void uiPupMenuError(struct bContext *C, char *str, ...);
 
325
void uiPupMenuOkee(struct bContext *C, const char *opname, const char *str, ...)
 
326
#ifdef __GNUC__
 
327
__attribute__ ((format (printf, 3, 4)))
 
328
#endif
 
329
;
 
330
void uiPupMenuSaveOver(struct bContext *C, struct wmOperator *op, const char *filename);
 
331
void uiPupMenuNotice(struct bContext *C, const char *str, ...)
 
332
#ifdef __GNUC__
 
333
__attribute__ ((format (printf, 2, 3)))
 
334
#endif
 
335
;
 
336
void uiPupMenuError(struct bContext *C, const char *str, ...)
 
337
#ifdef __GNUC__
 
338
__attribute__ ((format (printf, 2, 3)))
 
339
#endif
 
340
;
281
341
void uiPupMenuReports(struct bContext *C, struct ReportList *reports);
282
342
void uiPupMenuInvoke(struct bContext *C, const char *idname); /* popup registered menu */
283
343
 
287
347
 * but allow using all button types and creating an own layout. */
288
348
 
289
349
typedef uiBlock* (*uiBlockCreateFunc)(struct bContext *C, struct ARegion *ar, void *arg1);
 
350
typedef void (*uiBlockCancelFunc)(void *arg1);
290
351
 
291
352
void uiPupBlock(struct bContext *C, uiBlockCreateFunc func, void *arg);
292
 
void uiPupBlockO(struct bContext *C, uiBlockCreateFunc func, void *arg, char *opname, int opcontext);
293
 
void uiPupBlockOperator(struct bContext *C, uiBlockCreateFunc func, struct wmOperator *op, int opcontext);
 
353
void uiPupBlockO(struct bContext *C, uiBlockCreateFunc func, void *arg, const char *opname, int opcontext);
 
354
void uiPupBlockEx(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg);
 
355
/* void uiPupBlockOperator(struct bContext *C, uiBlockCreateFunc func, struct wmOperator *op, int opcontext); */ /* UNUSED */
294
356
 
295
357
void uiPupBlockClose(struct bContext *C, uiBlock *block);
296
358
 
309
371
void uiEndBlock(const struct bContext *C, uiBlock *block);
310
372
void uiDrawBlock(const struct bContext *C, struct uiBlock *block);
311
373
 
312
 
uiBlock *uiGetBlock(char *name, struct ARegion *ar);
 
374
uiBlock *uiGetBlock(const char *name, struct ARegion *ar);
313
375
 
314
 
void uiBlockSetEmboss(uiBlock *block, short dt);
 
376
void uiBlockSetEmboss(uiBlock *block, char dt);
315
377
 
316
378
void uiFreeBlock(const struct bContext *C, uiBlock *block);
317
379
void uiFreeBlocks(const struct bContext *C, struct ListBase *lb);
318
380
void uiFreeInactiveBlocks(const struct bContext *C, struct ListBase *lb);
 
381
void uiFreeActiveButtons(const struct bContext *C, struct bScreen *screen);
319
382
 
320
383
void uiBlockSetRegion(uiBlock *block, struct ARegion *region);
321
384
 
322
 
void uiBlockSetButLock(uiBlock *block, int val, char *lockstr);
 
385
void uiBlockSetButLock(uiBlock *block, int val, const char *lockstr);
323
386
void uiBlockClearButLock(uiBlock *block);
324
387
 
325
388
/* automatic aligning, horiz or verical */
332
395
        UI_BLOCK_BOUNDS_TEXT,
333
396
        UI_BLOCK_BOUNDS_POPUP_MOUSE,
334
397
        UI_BLOCK_BOUNDS_POPUP_MENU,
335
 
        UI_BLOCK_BOUNDS_POPUP_CENTER,
 
398
        UI_BLOCK_BOUNDS_POPUP_CENTER
336
399
} eBlockBoundsCalc;
337
400
 
338
401
void uiBoundsBlock(struct uiBlock *block, int addval);
340
403
void uiPopupBoundsBlock(uiBlock *block, int addval, int mx, int my);
341
404
void uiMenuPopupBoundsBlock(uiBlock *block, int addvall, int mx, int my);
342
405
void uiCenteredBoundsBlock(uiBlock *block, int addval);
 
406
void uiExplicitBoundsBlock(uiBlock *block, int minx, int miny, int maxx, int maxy);
343
407
 
344
408
int             uiBlocksGetYMin         (struct ListBase *lb);
345
409
 
378
442
 * - O: operator */
379
443
 
380
444
uiBut *uiDefBut(uiBlock *block, 
381
 
                                           int type, int retval, char *str, 
382
 
                                           short x1, short y1, 
 
445
                                           int type, int retval, const char *str, 
 
446
                                           int x1, int y1, 
383
447
                                           short x2, short y2, 
384
448
                                           void *poin, 
385
449
                                           float min, float max, 
386
 
                                           float a1, float a2,  char *tip);
387
 
uiBut *uiDefButF(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
388
 
uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
389
 
uiBut *uiDefButI(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
390
 
uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
391
 
uiBut *uiDefButS(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
392
 
uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
393
 
uiBut *uiDefButC(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
394
 
uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
395
 
uiBut *uiDefButR(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2,  char *tip);
396
 
uiBut *uiDefButO(uiBlock *block, int type, char *opname, int opcontext, char *str, short x1, short y1, short x2, short y2, char *tip);
 
450
                                           float a1, float a2, const char *tip);
 
451
uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
452
uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
453
uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
454
uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
455
uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
456
uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
457
uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
458
uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
459
uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip);
 
460
uiBut *uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip);
 
461
uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
462
uiBut *uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
463
uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip);
397
464
 
398
465
uiBut *uiDefIconBut(uiBlock *block, 
399
466
                                           int type, int retval, int icon, 
400
 
                                           short x1, short y1, 
 
467
                                           int x1, int y1, 
401
468
                                           short x2, short y2, 
402
469
                                           void *poin, 
403
470
                                           float min, float max, 
404
 
                                           float a1, float a2,  char *tip);
405
 
uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
406
 
uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
407
 
uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
408
 
uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
409
 
uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
410
 
uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
411
 
uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
412
 
uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
413
 
uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2,  char *tip);
414
 
uiBut *uiDefIconButO(uiBlock *block, int type, char *opname, int opcontext, int icon, short x1, short y1, short x2, short y2, char *tip);
 
471
                                           float a1, float a2,  const char *tip);
 
472
uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
473
uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
474
uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
475
uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
476
uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
477
uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
478
uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
479
uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
480
uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip);
 
481
uiBut *uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip);
 
482
uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip);
 
483
uiBut *uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip);
415
484
 
416
485
uiBut *uiDefIconTextBut(uiBlock *block,
417
 
                                                int type, int retval, int icon, char *str, 
418
 
                                                short x1, short y1,
 
486
                                                int type, int retval, int icon, const char *str, 
 
487
                                                int x1, int y1,
419
488
                                                short x2, short y2,
420
489
                                                void *poin,
421
490
                                                float min, float max,
422
 
                                                float a1, float a2,  char *tip);
423
 
uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
424
 
uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2,  char *tip);
425
 
uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
426
 
uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2,  char *tip);
427
 
uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
428
 
uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2,  char *tip);
429
 
uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
430
 
uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2,  char *tip);
431
 
uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2,  char *tip);
432
 
uiBut *uiDefIconTextButO(uiBlock *block, int type, char *opname, int opcontext, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
 
491
                                                float a1, float a2, const char *tip);
 
492
uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
493
uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip);
 
494
uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
495
uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip);
 
496
uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
497
uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip);
 
498
uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
499
uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip);
 
500
uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip);
 
501
uiBut *uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip);
 
502
uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
503
uiBut *uiDefIconTextButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip);
433
504
 
434
505
/* for passing inputs to ButO buttons */
435
506
struct PointerRNA *uiButGetOperatorPtrRNA(uiBut *but);
436
507
 
 
508
void uiButSetUnitType(uiBut *but, const int unit_type);
 
509
int uiButGetUnitType(uiBut *but);
 
510
 
437
511
/* Special Buttons
438
512
 *
439
 
 * Butons with a more specific purpose:
 
513
 * Buttons with a more specific purpose:
440
514
 * - IDPoinBut: for creating buttons that work on a pointer to an ID block.
441
515
 * - MenuBut: buttons that popup a menu (in headers usually).
442
516
 * - PulldownBut: like MenuBut, but creating a uiBlock (for compatibility).
459
533
#define UI_ID_PREVIEWS          2048
460
534
#define UI_ID_FULL                      (UI_ID_RENAME|UI_ID_BROWSE|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_ALONE|UI_ID_DELETE|UI_ID_LOCAL)
461
535
 
462
 
typedef void (*uiIDPoinFuncFP)(struct bContext *C, char *str, struct ID **idpp);
 
536
typedef void (*uiIDPoinFuncFP)(struct bContext *C, const char *str, struct ID **idpp);
463
537
typedef void (*uiIDPoinFunc)(struct bContext *C, struct ID *id, int event);
464
538
 
465
 
uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, char *str,
466
 
                                                short x1, short y1, short x2, short y2, void *idpp, char *tip);
 
539
uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str,
 
540
                                                int x1, int y1, short x2, short y2, void *idpp, const char *tip);
467
541
 
468
542
int uiIconFromID(struct ID *id);
469
543
 
470
 
uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip);
471
 
uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, char *str, short x1, short y1, short x2, short y2, char *tip);
472
 
uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
473
 
uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, char *tip);
474
 
 
475
 
uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
476
 
uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, char *str, short x1, short y1, short x2, short y2, char *tip);
477
 
 
478
 
uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, char *tip);
479
 
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
480
 
 
481
 
uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
482
 
uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, char *tip);
483
 
 
484
 
uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, float a1, float a2, char *tip);
485
 
 
486
 
void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
487
 
 
488
 
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, char *name, int icon, int x1, int y1, int x2, int y2);
489
 
void uiDefAutoButsRNA(const struct bContext *C, uiLayout *layout, struct PointerRNA *ptr, int columns);
 
544
uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
545
uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
546
uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
547
uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x1, int y1, short x2, short y2, const char *tip);
 
548
 
 
549
uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
550
uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
551
 
 
552
uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x1, int y1, short x2, short y2, const char *tip);
 
553
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip);
 
554
 
 
555
uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *spoin, const char *tip);
 
556
uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip);
 
557
 
 
558
uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip);
 
559
 
 
560
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2);
 
561
int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align);
490
562
 
491
563
/* Links
492
564
 *
498
570
void uiComposeLinks(uiBlock *block);
499
571
uiBut *uiFindInlink(uiBlock *block, void *poin);
500
572
 
501
 
/* Callbacks
502
 
 *
503
 
 * uiBlockSetHandleFunc/ButmFunc are for handling events through a callback.
504
 
 * HandleFunc gets the retval passed on, and ButmFunc gets a2. The latter is
505
 
 * mostly for compatibility with older code.
506
 
 *
507
 
 * uiButSetCompleteFunc is for tab completion.
508
 
 *
509
 
 * uiButSearchFunc is for name buttons, showing a popup with matches
510
 
 *
511
 
 * uiBlockSetFunc and uiButSetFunc are callbacks run when a button is used,
512
 
 * in case events, operators or RNA are not sufficient to handle the button.
513
 
 *
514
 
 * uiButSetNFunc will free the argument with MEM_freeN. */
515
 
 
516
 
typedef struct uiSearchItems uiSearchItems;
517
 
 
518
 
typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
519
 
typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
520
 
typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
521
 
typedef void (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
522
 
typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, char *str, uiSearchItems *items);
523
 
typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
524
 
                
525
573
                /* use inside searchfunc to add items */
526
574
int             uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid);
527
575
                /* bfunc gets search item *poin as arg2, or if NULL the old string */
542
590
 
543
591
void    uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2);
544
592
 
 
593
void uiButSetFocusOnEnter       (struct wmWindow *win, uiBut *but);
 
594
 
545
595
/* Autocomplete
546
596
 *
547
597
 * Tab complete helper functions, for use in uiButCompleteFunc callbacks.
550
600
 
551
601
typedef struct AutoComplete AutoComplete;
552
602
 
553
 
AutoComplete *autocomplete_begin(char *startname, int maxlen);
 
603
AutoComplete *autocomplete_begin(const char *startname, size_t maxlen);
554
604
void autocomplete_do_name(AutoComplete *autocpl, const char *name);
555
605
void autocomplete_end(AutoComplete *autocpl, char *autoname);
556
606
 
561
611
 * not clear yet so we postpone that. */
562
612
 
563
613
void uiBeginPanels(const struct bContext *C, struct ARegion *ar);
564
 
void uiEndPanels(const struct bContext *C, struct ARegion *ar);
 
614
void uiEndPanels(const struct bContext *C, struct ARegion *ar, int *x, int *y);
 
615
void uiDrawPanels(const struct bContext *C, struct ARegion *ar);
565
616
 
566
617
struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock *block, struct PanelType *pt, int *open);
567
618
void uiEndPanel(uiBlock *block, int width, int height);
573
624
 * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */
574
625
 
575
626
void UI_add_region_handlers(struct ListBase *handlers);
576
 
void UI_add_area_handlers(struct ListBase *handlers);
577
627
void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup);
578
628
void UI_remove_popup_handlers(struct ListBase *handlers, uiPopupBlockHandle *popup);
579
629
 
584
634
 
585
635
void UI_init(void);
586
636
void UI_init_userdef(void);
 
637
void UI_reinit_font(void);
587
638
void UI_exit(void);
588
639
 
589
640
/* Layout
605
656
#define UI_LAYOUT_MENU                  2
606
657
#define UI_LAYOUT_TOOLBAR               3
607
658
 
608
 
#define UI_UNIT_X                               20
609
 
#define UI_UNIT_Y                               20
 
659
#define UI_UNIT_X                               U.widget_unit
 
660
#define UI_UNIT_Y                               U.widget_unit
610
661
 
611
662
#define UI_LAYOUT_ALIGN_EXPAND  0
612
663
#define UI_LAYOUT_ALIGN_LEFT    1
623
674
#define UI_ITEM_R_NO_BG                 128
624
675
#define UI_ITEM_R_IMMEDIATE             256
625
676
 
 
677
/* uiLayoutOperatorButs flags */
 
678
#define UI_LAYOUT_OP_SHOW_TITLE 1
 
679
#define UI_LAYOUT_OP_SHOW_EMPTY 2
 
680
 
 
681
/* flags to set which corners will become rounded:
 
682
 *
 
683
 * 1------2
 
684
 * |      |
 
685
 * 8------4 */
 
686
 
 
687
enum {
 
688
        UI_CNR_TOP_LEFT= 1,
 
689
        UI_CNR_TOP_RIGHT= 2,
 
690
        UI_CNR_BOTTOM_RIGHT= 4,
 
691
        UI_CNR_BOTTOM_LEFT= 8,
 
692
        /* just for convenience */
 
693
        UI_CNR_NONE= 0,
 
694
        UI_CNR_ALL= (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)
 
695
};
 
696
 
 
697
/* not apart of the corner flags but mixed in some functions  */
 
698
#define UI_RB_ALPHA (UI_CNR_ALL + 1)
 
699
 
626
700
uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style);
627
701
void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout);
628
702
void uiBlockLayoutResolve(uiBlock *block, int *x, int *y);
630
704
uiBlock *uiLayoutGetBlock(uiLayout *layout);
631
705
 
632
706
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
633
 
void uiLayoutSetContextPointer(uiLayout *layout, char *name, struct PointerRNA *ptr);
634
 
char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing
 
707
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr);
 
708
void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context);
 
709
const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing
 
710
void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag);
 
711
struct MenuType *uiButGetMenuType(uiBut *but);
635
712
 
636
713
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
637
714
void uiLayoutSetActive(uiLayout *layout, int active);
668
745
/* templates */
669
746
void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus);
670
747
void uiTemplateDopeSheetFilter(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
671
 
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
672
 
        char *newop, char *openop, char *unlinkop, char *filterop);
673
 
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
674
 
                                  char *newop, char *openop, char *unlinkop, char *filterop);
675
 
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
676
 
        char *newop, char *openop, char *unlinkop, char *filterop, int rows, int cols);
677
 
void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, 
678
 
        char *proptypename, char *text);
679
 
void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, 
680
 
        struct PointerRNA *root_ptr, char *text);
681
 
uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, int compact);
682
 
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr, int compact);
683
 
void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot);
684
 
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
685
 
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
686
 
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
687
 
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand);
688
 
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, char *propname, int type, int levels, int brush);
689
 
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
690
 
void uiTemplateTriColorSet(uiLayout *layout, struct PointerRNA *ptr, char *propname);
691
 
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, char *propname,
692
 
                          PointerRNA *used_ptr, char *used_propname, int active_layer);
693
 
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *userptr, int compact);
 
748
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
 
749
        const char *newop, const char *openop, const char *unlinkop);
 
750
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
 
751
                        const char *newop, const char *openop, const char *unlinkop);
 
752
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
 
753
        const char *newop, const char *openop, const char *unlinkop, int rows, int cols);
 
754
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, 
 
755
        const char *proptypename, const char *text);
 
756
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, 
 
757
        struct PointerRNA *root_ptr, const char *text);
 
758
uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
 
759
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
 
760
void uiTemplatePreview(uiLayout *layout, struct ID *id, int show_buttons, struct ID *parent, struct MTex *slot);
 
761
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int expand);
 
762
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
 
763
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
 
764
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
 
765
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, int levels, int brush);
 
766
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
 
767
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
 
768
                      PointerRNA *used_ptr, const char *used_propname, int active_layer);
 
769
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact);
 
770
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr);
694
771
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
695
772
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
696
773
void uiTemplateOperatorSearch(uiLayout *layout);
697
774
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
 
775
void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
698
776
void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex);
699
777
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
700
 
 
701
 
void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *activeptr, char *activeprop, int rows, int maxrows, int type);
 
778
void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
 
779
 
 
780
void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, const char *prop_list, int rows, int maxrows, int type);
 
781
void uiTemplateNodeLink(uiLayout *layout, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
 
782
void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input);
 
783
void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
 
784
void uiTemplateTextureShow(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop);
 
785
 
 
786
void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact);
 
787
void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname);
 
788
void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int cmpact);
702
789
 
703
790
/* items */
704
 
void uiItemO(uiLayout *layout, char *name, int icon, char *opname);
705
 
void uiItemEnumO(uiLayout *layout, char *opname, char *name, int icon, char *propname, int value);
706
 
void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value);
707
 
void uiItemsEnumO(uiLayout *layout, char *opname, char *propname);
708
 
void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value);
709
 
void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value);
710
 
void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value);
711
 
void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value);
712
 
PointerRNA uiItemFullO(uiLayout *layout, char *idname, char *name, int icon, struct IDProperty *properties, int context, int flag);
713
 
 
714
 
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, char *propname, int flag, char *name, int icon);
715
 
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, char *name, int icon);
716
 
void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value);
717
 
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, char *propname, char *value, char *name, int icon);
718
 
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname);
719
 
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname, char *name, int icon);
720
 
void uiItemsFullEnumO(uiLayout *layout, char *opname, char *propname, struct IDProperty *properties, int context, int flag);
721
 
 
722
 
void uiItemL(uiLayout *layout, char *name, int icon); /* label */
723
 
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, char *name, int icon); /* label icon for dragging */
724
 
void uiItemM(uiLayout *layout, struct bContext *C, char *menuname, char *name, int icon); /* menu */
725
 
void uiItemV(uiLayout *layout, char *name, int icon, int argval); /* value */
 
791
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
 
792
void uiItemEnumO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, const char *propname, int value);
 
793
void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value);
 
794
void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value);
 
795
void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value);
 
796
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname);
 
797
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value);
 
798
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value);
 
799
void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, float value);
 
800
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value);
 
801
 
 
802
PointerRNA uiItemFullO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, IDProperty *properties, int context, int flag);
 
803
PointerRNA uiItemFullO(uiLayout *layout, const char *idname, const char *name, int icon, struct IDProperty *properties, int context, int flag);
 
804
 
 
805
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon);
 
806
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon);
 
807
void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value);
 
808
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon);
 
809
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
 
810
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon);
 
811
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, struct IDProperty *properties, int context, int flag);
 
812
 
 
813
void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
 
814
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon); /* label icon for dragging */
 
815
void uiItemM(uiLayout *layout, struct bContext *C, const char *menuname, const char *name, int icon); /* menu */
 
816
void uiItemV(uiLayout *layout, const char *name, int icon, int argval); /* value */
726
817
void uiItemS(uiLayout *layout); /* separator */
727
818
 
728
 
void uiItemMenuF(uiLayout *layout, char *name, int icon, uiMenuCreateFunc func, void *arg);
729
 
void uiItemMenuEnumO(uiLayout *layout, char *opname, char *propname, char *name, int icon);
730
 
void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname, char *name, int icon);
 
819
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
 
820
void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname, const char *name, int icon);
 
821
void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon);
731
822
 
732
823
/* UI Operators */
733
824
void UI_buttons_operatortypes(void);
734
825
 
735
826
/* Helpers for Operators */
736
 
void uiAnimContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
 
827
uiBut *uiContextActiveButton(const struct bContext *C);
 
828
void uiContextActiveProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
 
829
void uiContextActivePropertyHandle(struct bContext *C);
 
830
struct wmOperator *uiContextActiveOperator(const struct bContext *C);
 
831
void uiContextAnimUpdate(const struct bContext *C);
737
832
void uiFileBrowseContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
738
833
void uiIDContextProperty(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
739
834
 
740
835
/* Styled text draw */
741
836
void uiStyleFontSet(struct uiFontStyle *fs);
742
 
void uiStyleFontDraw(struct uiFontStyle *fs, struct rcti *rect, char *str);
743
 
void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, char *str);
744
 
 
745
 
int UI_GetStringWidth(char *str); // XXX temp
746
 
void UI_DrawString(float x, float y, char *str); // XXX temp
747
 
 
748
 
#endif /*  UI_INTERFACE_H */
 
837
void uiStyleFontDrawExt(struct uiFontStyle *fs, struct rcti *rect, const char *str,
 
838
        float *r_xofs, float *r_yofs);
 
839
void uiStyleFontDraw(struct uiFontStyle *fs, struct rcti *rect, const char *str);
 
840
void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const char *str);
 
841
 
 
842
int UI_GetStringWidth(const char *str); // XXX temp
 
843
void UI_DrawString(float x, float y, const char *str); // XXX temp
 
844
void UI_DrawTriIcon(float x, float y, char dir);
 
845
uiStyle* UI_GetStyle(void);
 
846
/* linker workaround ack! */
 
847
void UI_template_fix_linking(void);
 
848
 
 
849
/* UI_OT_editsource helpers */
 
850
int  UI_editsource_enable_check(void);
 
851
void UI_editsource_active_but_test(uiBut *but);
 
852
 
 
853
#endif /*  __UI_INTERFACE_H__ */
749
854