Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c14
-rw-r--r--source/blender/editors/interface/interface_draw.c31
-rw-r--r--source/blender/editors/interface/interface_handlers.c20
-rw-r--r--source/blender/editors/interface/interface_icons.c12
-rw-r--r--source/blender/editors/interface/interface_intern.h4
-rw-r--r--source/blender/editors/interface/interface_layout.c8
-rw-r--r--source/blender/editors/interface/interface_panel.c37
-rw-r--r--source/blender/editors/interface/interface_regions.c16
-rw-r--r--source/blender/editors/interface/interface_style.c27
-rw-r--r--source/blender/editors/interface/interface_templates.c10
-rw-r--r--source/blender/editors/interface/interface_utils.c2
-rw-r--r--source/blender/editors/interface/interface_widgets.c68
-rw-r--r--source/blender/editors/interface/view2d_ops.c7
13 files changed, 136 insertions, 120 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 1944f81ec2d..6e3e7a2a4e0 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1514,7 +1514,7 @@ void ui_set_but_val(uiBut *but, double value)
/* gcc 3.2.1 seems to have problems
* casting a double like 32772.0 to
* a short so we cast to an int, then
- to a short */
+ * to a short */
int gcckludge;
gcckludge = (int) floor(value+0.5);
value= (short)gcckludge;
@@ -2515,13 +2515,13 @@ void ui_block_do_align(uiBlock *block)
}
}
-/*
- * ui_def_but is the function that draws many button types
-
+/**
+ * \brief ui_def_but is the function that draws many button types
+ *
* for float buttons:
- * "a1" Click Step (how much to change the value each click)
- * "a2" Number of decimal point values to display. 0 defaults to 3 (0.000)
- * 1,2,3, and a maximum of 4, all greater values will be clamped to 4.
+ * - \a a1 Click Step (how much to change the value each click)
+ * - \a a2 Number of decimal point values to display. 0 defaults to 3 (0.000)
+ * 1,2,3, and a maximum of 4, all greater values will be clamped to 4.
*/
static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
{
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 93cb0f8ae97..97248e8710c 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -432,7 +432,8 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
if (!ibuf) return;
- /* scissor doesn't seem to be doing the right thing...?
+ /* scissor doesn't seem to be doing the right thing...? */
+#if 0
//glColor4f(1.0, 0.f, 0.f, 1.f);
//fdrawbox(rect->xmin, rect->ymin, rect->xmax, rect->ymax)
@@ -441,7 +442,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
// prevent drawing outside widget area
glGetIntegerv(GL_SCISSOR_BOX, scissor);
glScissor(ar->winrct.xmin + rect->xmin, ar->winrct.ymin + rect->ymin, w, h);
- */
+#endif
glEnable(GL_BLEND);
glColor4f(0.0, 0.0, 0.0, 0.0);
@@ -451,10 +452,10 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w
glDisable(GL_BLEND);
- /*
+#if 0
// restore scissortest
glScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
- */
+#endif
#endif
}
@@ -1138,7 +1139,8 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
setlinestyle(0);
glBegin(GL_LINES);
- /* glColor3ub(0, 0, 0);
+#if 0
+ glColor3ub(0, 0, 0);
glVertex2fv(v1);
glVertex2fv(v1a);
glColor3ub(255, 255, 255);
@@ -1150,7 +1152,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
glColor3ub(255, 255, 255);
glVertex2fv(v2a);
glVertex2fv(v3);
- */
+#endif
}
else {
glColor3ub(0, 0, 0);
@@ -1367,17 +1369,21 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
/* cfra option */
- /* XXX 2.48
+ /* XXX 2.48 */
+#if 0
if(cumap->flag & CUMA_DRAW_CFRA) {
glColor3ub(0x60, 0xc0, 0x40);
glBegin(GL_LINES);
glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymin);
glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymax);
glEnd();
- }*/
+ }
+#endif
/* sample option */
- /* XXX 2.48
- * if(cumap->flag & CUMA_DRAW_SAMPLE) {
+
+ /* XXX 2.48 */
+#if 0
+ if(cumap->flag & CUMA_DRAW_SAMPLE) {
if(cumap->cur==3) {
float lum= cumap->sample[0]*0.35f + cumap->sample[1]*0.45f + cumap->sample[2]*0.2f;
glColor3ub(240, 240, 240);
@@ -1400,8 +1406,9 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
glVertex2f(rect->xmin + zoomx*(cumap->sample[cumap->cur]-offsx), rect->ymax);
glEnd();
}
- }*/
-
+ }
+#endif
+
/* the curve */
glColor3ubv((unsigned char*)wcol->item);
glEnable(GL_LINE_SMOOTH);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 41385292707..f1d4d6b7277 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1986,7 +1986,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
const char *utf8_buf= event->utf8_buf;
/* exception that's useful for number buttons, some keyboard
- numpads have a comma instead of a period */
+ * numpads have a comma instead of a period */
if(ELEM3(but->type, NUM, NUMABS, NUMSLI)) { /* could use data->min*/
if(event->type == PADPERIOD && ascii == ',') {
ascii = '.';
@@ -2980,9 +2980,10 @@ static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut
retval= WM_UI_HANDLER_BREAK;
}
/* UNUSED - otherwise code is ok, add back if needed */
- /* else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
+#if 0
+ else if(ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS)
click= 1;
- */
+#endif
}
}
else if(data->state == BUTTON_STATE_NUM_EDITING) {
@@ -4674,12 +4675,13 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemFullO(layout, "WM_OT_doc_view", "View Docs", ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
/* XXX inactive option, not for public! */
-/* WM_operator_properties_create(&ptr_props, "WM_OT_doc_edit");
+#if 0
+ WM_operator_properties_create(&ptr_props, "WM_OT_doc_edit");
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", RNA_property_description(but->rnaprop));
uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", ICON_NONE, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
- */
+ #endif
}
else if (but->optype) {
WM_operator_py_idname(buf, but->optype->idname);
@@ -5252,10 +5254,10 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
if(state != BUTTON_STATE_EXIT) {
/* When objects for eg. are removed, running ui_check_but() can access
- the removed data - so disable update on exit. Also in case of
- highlight when not in a popup menu, we remove because data used in
- button below popup might have been removed by action of popup. Needs
- a more reliable solution... */
+ * the removed data - so disable update on exit. Also in case of
+ * highlight when not in a popup menu, we remove because data used in
+ * button below popup might have been removed by action of popup. Needs
+ * a more reliable solution... */
if(state != BUTTON_STATE_HIGHLIGHT || (but->block->flag & UI_BLOCK_LOOP))
ui_check_but(but);
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 3e6d4f31479..bde2c334444 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -607,7 +607,7 @@ static void init_iconfile_list(struct ListBase *list)
return;
/* since BLI_dir_contents changes the current working directory, restore it
- back to old value afterwards */
+ * back to old value afterwards */
if(!BLI_current_working_dir(olddir, sizeof(olddir)))
restoredir = 0;
totfile = BLI_dir_contents(icondir, &dir);
@@ -626,7 +626,7 @@ static void init_iconfile_list(struct ListBase *list)
ImBuf *bbuf= NULL;
/* check to see if the image is the right size, continue if not */
/* copying strings here should go ok, assuming that we never get back
- a complete path to file longer than 256 chars */
+ * a complete path to file longer than 256 chars */
BLI_join_dirfile(iconfilestr, sizeof(iconfilestr), icondir, filename);
bbuf= IMB_loadiffname(iconfilestr, IB_rect);
@@ -983,7 +983,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
if(di->type == ICON_TYPE_VECTOR) {
/* vector icons use the uiBlock transformation, they are not drawn
- with untransformed coordinates like the other icons */
+ * with untransformed coordinates like the other icons */
di->data.vector.func((int)x, (int)y, ICON_DEFAULT_HEIGHT, ICON_DEFAULT_HEIGHT, 1.0f);
}
else if(di->type == ICON_TYPE_TEXTURE) {
@@ -1046,7 +1046,7 @@ static void ui_id_brush_render(bContext *C, ID *id)
for(i = 0; i < NUM_ICON_SIZES; i++) {
/* check if rect needs to be created; changed
- only set by dynamic icons */
+ * only set by dynamic icons */
if((pi->changed[i] || !pi->rect[i])) {
icon_set_image(C, id, pi, i);
pi->changed[i] = 0;
@@ -1070,8 +1070,8 @@ static int ui_id_brush_get_icon(bContext *C, ID *id)
int tool, mode = 0;
/* XXX: this is not nice, should probably make brushes
- be strictly in one paint mode only to avoid
- checking various context stuff here */
+ * be strictly in one paint mode only to avoid
+ * checking various context stuff here */
if(CTX_wm_view3d(C) && ob) {
if(ob->mode & OB_MODE_SCULPT)
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index d324018e4ba..dd4bbc75249 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -176,10 +176,10 @@ struct uiBut {
struct bContextStore *context;
/* not ysed yet, was used in 2.4x for ui_draw_pulldown_round & friends */
- /*
+#if 0
void (*embossfunc)(int , int , float, float, float, float, float, int);
void (*sliderfunc)(int , float, float, float, float, float, float, int);
- */
+#endif
uiButCompleteFunc autocomplete_func;
void *autofunc_arg;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index b3b187f92a2..a258d22a8dc 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -536,9 +536,11 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n
uiBlockSetCurLayout(block, sub);
if(name[0]) {
- /* XXX UI_GetStringWidth is not accurate
- labelw= UI_GetStringWidth(name);
- CLAMP(labelw, w/4, 3*w/4);*/
+ /* XXX UI_GetStringWidth is not accurate */
+#if 0
+ labelw = UI_GetStringWidth(name);
+ CLAMP(labelw, w/4, 3*w/4);
+#endif
labelw= w/3;
uiDefBut(block, LABEL, 0, name, x, y, labelw, h, NULL, 0.0, 0.0, 0, 0, "");
w= w-labelw;
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index d802c8640b8..769087b73ef 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -543,8 +543,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
}
/* if the panel is minimized vertically:
- * (------)
- */
+ * (------)
+ */
if(panel->flag & PNL_CLOSEDY) {
}
@@ -618,7 +618,7 @@ static int get_panel_size_y(Panel *pa)
}
/* this function is needed because uiBlock and Panel itself dont
-change sizey or location when closed */
+ * change sizey or location when closed */
static int get_panel_real_ofsy(Panel *pa)
{
if(pa->flag & PNL_CLOSEDY) return pa->ofsy+pa->sizey;
@@ -639,10 +639,10 @@ typedef struct PanelSort {
} PanelSort;
/* note about sorting;
- the sortorder has a lower value for new panels being added.
- however, that only works to insert a single panel, when more new panels get
- added the coordinates of existing panels and the previously stored to-be-insterted
- panels do not match for sorting */
+ * the sortorder has a lower value for new panels being added.
+ * however, that only works to insert a single panel, when more new panels get
+ * added the coordinates of existing panels and the previously stored to-be-insterted
+ * panels do not match for sorting */
static int find_leftmost_panel(const void *a1, const void *a2)
{
@@ -837,7 +837,7 @@ void uiBeginPanels(const bContext *UNUSED(C), ARegion *ar)
{
Panel *pa;
- /* set all panels as inactive, so that at the end we know
+ /* set all panels as inactive, so that at the end we know
* which ones were used */
for(pa=ar->panels.first; pa; pa=pa->next) {
if(pa->runtime_flag & PNL_ACTIVE)
@@ -1150,11 +1150,14 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
}
}
else if(event->type == ESCKEY) {
- /*XXX 2.50 if(block->handler) {
+ /*XXX 2.50*/
+#if 0
+ if(block->handler) {
rem_blockhandler(sa, block->handler);
ED_region_tag_redraw(ar);
retval= WM_UI_HANDLER_BREAK;
- }*/
+ }
+#endif
}
else if(event->type==PADPLUSKEY || event->type==PADMINUS) {
#if 0 // XXX make float panel exception?
@@ -1297,13 +1300,17 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat
ED_region_tag_redraw(ar);
/* XXX exception handling, 3d window preview panel */
- /* if(block->drawextra==BIF_view3d_previewdraw)
- BIF_view3d_previewrender_clear(curarea);*/
-
+#if 0
+ if(block->drawextra==BIF_view3d_previewdraw)
+ BIF_view3d_previewrender_clear(curarea);
+#endif
+
/* XXX exception handling, 3d window preview panel */
- /* if(block->drawextra==BIF_view3d_previewdraw)
+#if 0
+ if(block->drawextra==BIF_view3d_previewdraw)
BIF_view3d_previewrender_signal(curarea, PR_DISPRECT);
else if(strcmp(block->name, "image_panel_preview")==0)
- image_preview_event(2); */
+ image_preview_event(2);
+#endif
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 32f284826a7..40bd332a056 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1025,7 +1025,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
ar->regiondata= data;
/* special case, hardcoded feature, not draw backdrop when called from menus,
- assume for design that popup already added it */
+ * assume for design that popup already added it */
if(but->block->flag & UI_BLOCK_LOOP)
data->noback= 1;
@@ -1664,7 +1664,7 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
for(a=0; a<md->nitems; a++) {
if(a == column_end) {
/* start new column, and find out where it ends in advance, so we
- can flip the order of items properly per column */
+ * can flip the order of items properly per column */
column_start= a;
column_end= md->nitems;
@@ -1756,7 +1756,7 @@ static void ui_warp_pointer(int x, int y)
{
/* XXX 2.50 which function to use for this? */
/* OSX has very poor mousewarp support, it sends events;
- this causes a menu being pressed immediately ... */
+ * this causes a menu being pressed immediately ... */
#ifndef __APPLE__
warp_pointer(x, y);
#endif
@@ -2252,7 +2252,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
block= pup->block;
/* in some cases we create the block before the region,
- so we set it delayed here if necessary */
+ * so we set it delayed here if necessary */
if(BLI_findindex(&handle->region->uiblocks, block) == -1)
uiBlockSetRegion(block, handle->region);
@@ -2270,15 +2270,15 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
if((block->flag & UI_BLOCK_POPUP_MEMORY) &&
(bt= ui_popup_menu_memory(block, NULL))) {
/* position mouse on last clicked item, at 0.8*width of the
- button, so it doesn't overlap the text too much, also note
- the offset is negative because we are inverse moving the
- block to be under the mouse */
+ * button, so it doesn't overlap the text too much, also note
+ * the offset is negative because we are inverse moving the
+ * block to be under the mouse */
offset[0]= -(bt->x1 + 0.8f*(bt->x2 - bt->x1));
offset[1]= -(bt->y1 + 0.5f*UI_UNIT_Y);
}
else {
/* position mouse at 0.8*width of the button and below the tile
- on the first item */
+ * on the first item */
offset[0]= 0;
for(bt=block->buttons.first; bt; bt=bt->next)
offset[0]= MIN2(offset[0], -(bt->x1 + 0.8f*(bt->x2 - bt->x1)));
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 16b543737d0..b9c29888a64 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -60,20 +60,19 @@
/* style + theme + layout-engine = UI */
/*
- This is a complete set of layout rules, the 'state' of the Layout
- Engine. Multiple styles are possible, defined via C or Python. Styles
- get a name, and will typically get activated per region type, like
- "Header", or "Listview" or "Toolbar". Properties of Style definitions
- are:
-
- - default collumn properties, internal spacing, aligning, min/max width
- - button alignment rules (for groups)
- - label placement rules
- - internal labeling or external labeling default
- - default minimum widths for buttons/labels (in amount of characters)
- - font types, styles and relative sizes for Panel titles, labels, etc.
-
-*/
+ * This is a complete set of layout rules, the 'state' of the Layout
+ * Engine. Multiple styles are possible, defined via C or Python. Styles
+ * get a name, and will typically get activated per region type, like
+ * "Header", or "Listview" or "Toolbar". Properties of Style definitions
+ * are:
+ *
+ * - default collumn properties, internal spacing, aligning, min/max width
+ * - button alignment rules (for groups)
+ * - label placement rules
+ * - internal labeling or external labeling default
+ * - default minimum widths for buttons/labels (in amount of characters)
+ * - font types, styles and relative sizes for Panel titles, labels, etc.
+ */
/* ********************************************** */
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 1fc9b18a0f6..70336eb9e0f 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -797,7 +797,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
/* some modifiers could work with pre-tesselated curves only */
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
/* add disabled pre-tesselated button, so users could have
- message for this modifiers */
+ * message for this modifiers */
but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
TIP_("This modifier could be applied on splines' points only"));
uiButSetFlag(but, UI_BUT_DISABLED);
@@ -1251,8 +1251,8 @@ static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg))
RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb;
/* we call update here on the pointer property, this way the
- owner of the curve mapping can still define it's own update
- and notifier, even if the CurveMapping struct is shared. */
+ * owner of the curve mapping can still define it's own update
+ * and notifier, even if the CurveMapping struct is shared. */
RNA_property_update(C, &cb->ptr, cb->prop);
}
@@ -1313,7 +1313,7 @@ static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v)
ColorBand *coba= coba_v;
/* sneaky update here, we need to sort the colorband points to be in order,
- however the RNA pointer then is wrong, so we update it */
+ * however the RNA pointer then is wrong, so we update it */
colorband_update_sort(coba);
bt->rnapoin.data = coba->data + coba->cur;
}
@@ -2732,7 +2732,7 @@ void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr)
template_keymap_item_properties(layout, NULL, &propptr);
/* attach callbacks to compensate for missing properties update,
- we don't know which keymap (item) is being modified there */
+ * we don't know which keymap (item) is being modified there */
for(; but; but=but->next)
uiButSetFunc(but, keymap_item_modified, ptr->data, NULL);
}
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 8335668a624..610e9f8762d 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -210,7 +210,7 @@ int uiIconFromID(ID *id)
}
/* otherwise get it through RNA, creating the pointer
- will set the right type, also with subclassing */
+ * will set the right type, also with subclassing */
RNA_id_pointer_create(id, &ptr);
return (ptr.type)? RNA_struct_ui_icon(ptr.type) : ICON_NONE;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 419f13254e6..0e51932df90 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -62,17 +62,16 @@
/* ************** widget base functions ************** */
/*
- - in: roundbox codes for corner types and radius
- - return: array of [size][2][x,y] points, the edges of the roundbox, + UV coords
-
- - draw black box with alpha 0 on exact button boundbox
- - for ever AA step:
- - draw the inner part for a round filled box, with color blend codes or texture coords
- - draw outline in outline color
- - draw outer part, bottom half, extruded 1 pixel to bottom, for emboss shadow
- - draw extra decorations
- - draw background color box with alpha 1 on exact button boundbox
-
+ * - in: roundbox codes for corner types and radius
+ * - return: array of [size][2][x,y] points, the edges of the roundbox, + UV coords
+ *
+ * - draw black box with alpha 0 on exact button boundbox
+ * - for ever AA step:
+ * - draw the inner part for a round filled box, with color blend codes or texture coords
+ * - draw outline in outline color
+ * - draw outer part, bottom half, extruded 1 pixel to bottom, for emboss shadow
+ * - draw extra decorations
+ * - draw background color box with alpha 1 on exact button boundbox
*/
/* fill this struct with polygon info to draw AA'ed */
@@ -106,8 +105,8 @@ typedef struct uiWidgetBase {
} uiWidgetBase;
/* uiWidgetType: for time being only for visual appearance,
- later, a handling callback can be added too
-*/
+ * later, a handling callback can be added too
+ */
typedef struct uiWidgetType {
/* pointer to theme color definition */
@@ -1227,7 +1226,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
}
/* If there's an icon too (made with uiDefIconTextBut) then draw the icon
- and offset the text label to accommodate it */
+ * and offset the text label to accommodate it */
if (but->flag & UI_HAS_ICON) {
widget_draw_icon(but, but->icon+but->iconadd, 1.0f, rect);
@@ -1251,16 +1250,15 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
/* *********************** widget types ************************************* */
-/* uiWidgetStateColors
- char inner_anim[4];
- char inner_anim_sel[4];
- char inner_key[4];
- char inner_key_sel[4];
- char inner_driven[4];
- char inner_driven_sel[4];
- float blend;
-
-*/
+/* uiWidgetStateColors
+ * char inner_anim[4];
+ * char inner_anim_sel[4];
+ * char inner_key[4];
+ * char inner_key_sel[4];
+ * char inner_driven[4];
+ * char inner_driven_sel[4];
+ * float blend;
+ */
static struct uiWidgetStateColors wcol_state_colors= {
{115, 190, 76, 255},
@@ -1272,17 +1270,17 @@ static struct uiWidgetStateColors wcol_state_colors= {
0.5f, 0.0f
};
-/* uiWidgetColors
- float outline[3];
- float inner[4];
- float inner_sel[4];
- float item[3];
- float text[3];
- float text_sel[3];
-
- short shaded;
- float shadetop, shadedown;
-*/
+/* uiWidgetColors
+ * float outline[3];
+ * float inner[4];
+ * float inner_sel[4];
+ * float item[3];
+ * float text[3];
+ * float text_sel[3];
+ *
+ * short shaded;
+ * float shadetop, shadedown;
+ */
static struct uiWidgetColors wcol_num= {
{25, 25, 25, 255},
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index d8f187d181a..029ca50db5b 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -249,7 +249,8 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
/* XXX - Mode switching isn't implemented. See comments in 36818.
- * switch to zoom *
+ * switch to zoom */
+#if 0
case LEFTMOUSE:
if (event->val==KM_PRESS) {
* calculate overall delta mouse-movement for redo *
@@ -260,8 +261,8 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
WM_cursor_restore(CTX_wm_window(C));
WM_operator_name_call(C, "VIEW2D_OT_zoom", WM_OP_INVOKE_DEFAULT, NULL);
return OPERATOR_FINISHED;
- }*/
-
+ }
+#endif
default:
if (event->type == vpd->invoke_event || event->type==ESCKEY) {
if (event->val==KM_RELEASE) {