Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

interface_widgets.c File Reference

#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_utildefines.h"
#include "RNA_access.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BLF_api.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "interface_intern.h"

Go to the source code of this file.

Classes

struct  uiWidgetTrias
struct  uiWidgetBase
struct  uiWidgetType

Defines

#define WIDGET_CURVE_RESOLU   9
#define WIDGET_SIZE_MAX   (WIDGET_CURVE_RESOLU*4)
#define WIDGET_AA_JITTER   8
#define PREVIEW_PAD   4
#define LINK_RESOL   24
#define SWATCH_KEYED_BORDER   3

Typedefs

typedef struct uiWidgetTrias uiWidgetTrias
typedef struct uiWidgetBase uiWidgetBase
typedef struct uiWidgetType uiWidgetType

Functions

void ui_draw_anti_tria (float x1, float y1, float x2, float y2, float x3, float y3)
void ui_draw_anti_roundbox (int mode, float minx, float miny, float maxx, float maxy, float rad)
static void widget_init (uiWidgetBase *wtb)
static int round_box_shadow_edges (float(*vert)[2], rcti *rect, float rad, int roundboxalign, float step)
static void round_box__edges (uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad, float radi)
static void round_box_edges (uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad)
static void widget_num_tria (uiWidgetTrias *tria, rcti *rect, float triasize, char where)
static void widget_scroll_circle (uiWidgetTrias *tria, rcti *rect, float triasize, char where)
static void widget_trias_draw (uiWidgetTrias *tria)
static void widget_menu_trias (uiWidgetTrias *tria, rcti *rect)
static void widget_check_trias (uiWidgetTrias *tria, rcti *rect)
static void shadecolors4 (char coltop[4], char *coldown, const char *color, short shadetop, short shadedown)
static void round_box_shade_col4_r (unsigned char col_r[4], const char col1[4], const char col2[4], const float fac)
static void widget_verts_to_quad_strip (uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX *2+2][2])
static void widget_verts_to_quad_strip_open (uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX *2][2])
static void widgetbase_outline (uiWidgetBase *wtb)
static void widgetbase_draw (uiWidgetBase *wtb, uiWidgetColors *wcol)
static void widget_draw_preview (BIFIconID icon, float UNUSED(alpha), rcti *rect)
static int ui_but_draw_menu_icon (uiBut *but)
static void widget_draw_icon (uiBut *but, BIFIconID icon, float alpha, rcti *rect)
static void ui_text_leftclip (uiFontStyle *fstyle, uiBut *but, rcti *rect)
static void ui_text_label_rightclip (uiFontStyle *fstyle, uiBut *but, rcti *rect)
static void widget_draw_text (uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect)
static void widget_draw_text_icon (uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect)
void ui_widget_color_init (ThemeUI *tui)
static void widget_state_blend (char cp[3], const char cpstate[3], const float fac)
static void widget_state (uiWidgetType *wt, int state)
static void widget_state_numslider (uiWidgetType *wt, int state)
static void widget_state_label (uiWidgetType *wt, int state)
static void widget_state_option_menu (uiWidgetType *wt, int state)
static void widget_state_nothing (uiWidgetType *wt, int UNUSED(state))
static void widget_state_pulldown (uiWidgetType *wt, int state)
static void widget_state_menu_item (uiWidgetType *wt, int state)
static void widget_softshadow (rcti *rect, int roundboxalign, float radin, float radout)
static void widget_menu_back (uiWidgetColors *wcol, rcti *rect, int flag, int direction)
static void ui_hsv_cursor (float x, float y)
void ui_hsvcircle_vals_from_pos (float *valrad, float *valdist, rcti *rect, float mx, float my)
static void ui_draw_but_HSVCIRCLE (uiBut *but, uiWidgetColors *wcol, rcti *rect)
void ui_draw_gradient (rcti *rect, const float hsv[3], int type, float alpha)
static void ui_draw_but_HSVCUBE (uiBut *but, rcti *rect)
static void ui_draw_but_HSV_v (uiBut *but, rcti *rect)
static void ui_draw_separator (rcti *rect, uiWidgetColors *wcol)
static void widget_numbut (uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
int ui_link_bezier_points (rcti *rect, float coord_array[][2], int resol)
void ui_draw_link_bezier (rcti *rect)
void uiWidgetScrollDraw (uiWidgetColors *wcol, rcti *rect, rcti *slider, int state)
static void widget_scroll (uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
static void widget_progressbar (uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
static void widget_link (uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
static void widget_numslider (uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_swatch (uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_icon_has_anim (uiBut *UNUSED(but), uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
static void widget_textbut (uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
static void widget_menubut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_menuiconbut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_menunodebut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_pulldownbut (uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
static void widget_menu_itembut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
static void widget_list_itembut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int UNUSED(roundboxalign))
static void widget_optionbut (uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign))
static void widget_radiobut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_box (uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_but (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_roundbut (uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign)
static void widget_draw_extra_mask (const bContext *C, uiBut *but, uiWidgetType *wt, rcti *rect)
static void widget_disabled (rcti *rect)
static uiWidgetTypewidget_type (uiWidgetTypeEnum type)
static int widget_roundbox_set (uiBut *but, rcti *rect)
void ui_draw_but (const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rcti *rect)
void ui_draw_menu_back (uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
void ui_draw_search_back (uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
void ui_draw_menu_item (uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state)
void ui_draw_preview_item (uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state)

Variables

static float cornervec [WIDGET_CURVE_RESOLU][2]
static float jit [WIDGET_AA_JITTER][2]
static float num_tria_vert [3][2]
static unsigned int num_tria_face [1][3]
static float scroll_circle_vert [16][2]
static unsigned int scroll_circle_face [14][3]
static float menu_tria_vert [6][2]
static unsigned int menu_tria_face [2][3] = {{2, 0, 1}, {3, 5, 4}}
static float check_tria_vert [6][2]
static unsigned int check_tria_face [4][3]
GLubyte checker_stipple_sml [32 *32/8]
static struct uiWidgetStateColors wcol_state_colors
static struct uiWidgetColors wcol_num
static struct uiWidgetColors wcol_numslider
static struct uiWidgetColors wcol_text
static struct uiWidgetColors wcol_option
static struct uiWidgetColors wcol_menu
static struct uiWidgetColors wcol_pulldown
static struct uiWidgetColors wcol_menu_item
static struct uiWidgetColors wcol_menu_back
static struct uiWidgetColors wcol_radio
static struct uiWidgetColors wcol_regular
static struct uiWidgetColors wcol_tool
static struct uiWidgetColors wcol_box
static struct uiWidgetColors wcol_toggle
static struct uiWidgetColors wcol_scroll
static struct uiWidgetColors wcol_progress
static struct uiWidgetColors wcol_list_item
static struct uiWidgetColors wcol_tmp

Detailed Description

Definition in file interface_widgets.c.


Define Documentation

#define LINK_RESOL   24

Definition at line 2189 of file interface_widgets.c.

Referenced by ui_draw_link_bezier().

#define PREVIEW_PAD   4

Definition at line 820 of file interface_widgets.c.

Referenced by widget_draw_preview().

#define SWATCH_KEYED_BORDER   3

Definition at line 2462 of file interface_widgets.c.

Referenced by widget_swatch().

#define WIDGET_AA_JITTER   8

Definition at line 133 of file interface_widgets.c.

Referenced by ui_draw_anti_roundbox(), ui_draw_anti_tria(), and widgetbase_draw().

#define WIDGET_CURVE_RESOLU   9

Definition at line 90 of file interface_widgets.c.

Referenced by round_box__edges(), and round_box_shadow_edges().

#define WIDGET_SIZE_MAX   (WIDGET_CURVE_RESOLU*4)

Typedef Documentation

typedef struct uiWidgetBase uiWidgetBase
typedef struct uiWidgetTrias uiWidgetTrias
typedef struct uiWidgetType uiWidgetType

Function Documentation

static void round_box__edges ( uiWidgetBase wt,
int  roundboxalign,
rcti rect,
float  rad,
float  radi 
) [static]
static void round_box_edges ( uiWidgetBase wt,
int  roundboxalign,
rcti rect,
float  rad 
) [static]
static void round_box_shade_col4_r ( unsigned char  col_r[4],
const char  col1[4],
const char  col2[4],
const float  fac 
) [static]

Definition at line 612 of file interface_widgets.c.

References FTOCHAR.

Referenced by widgetbase_draw().

static int round_box_shadow_edges ( float(*)  vert[2],
rcti rect,
float  rad,
int  roundboxalign,
float  step 
) [static]
static void shadecolors4 ( char  coltop[4],
char *  coldown,
const char *  color,
short  shadetop,
short  shadedown 
) [static]

Definition at line 598 of file interface_widgets.c.

References CLAMPIS.

Referenced by widgetbase_draw().

static int ui_but_draw_menu_icon ( uiBut but) [static]

Definition at line 843 of file interface_widgets.c.

References uiBut::dt, uiBut::flag, UI_EMBOSSP, and UI_ICON_SUBMENU.

Referenced by widget_draw_icon(), and widget_draw_text().

void ui_draw_anti_roundbox ( int  mode,
float  minx,
float  miny,
float  maxx,
float  maxy,
float  rad 
)

Definition at line 208 of file interface_widgets.c.

References MakeCursor::color, jit, uiDrawBox(), and WIDGET_AA_JITTER.

Referenced by uiRoundBox().

void ui_draw_anti_tria ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)
void ui_draw_but ( const bContext C,
ARegion ar,
uiStyle style,
uiBut but,
rcti rect 
)

Definition at line 2974 of file interface_widgets.c.

References uiBut::a1, BLOCK, uiBut::block, BUT, BUT_COLORBAND, BUT_CURVE, BUT_EXTRA, BUT_IMAGE, BUT_NORMAL, BUTM, COL, uiWidgetType::custom, uiWidgetType::draw, uiBut::dt, uiBut::editstr, uiBut::flag, uiBlock::flag, HISTOGRAM, HSVCIRCLE, HSVCUBE, HSVSLI, uiBut::icon, ICONTEXTROW, INLINK, LABEL, LINK, LISTBOX, LISTROW, MENU, NULL, NUM, NUMSLI, OPTION, OPTIONN, PROGRESSBAR, PULLDOWN, ROUNDBOX, ROW, SCROLL, SEARCH_MENU, SEPR, uiWidgetType::state, state, uiBut::str, TEX, uiWidgetType::text, TOG, TOG3, TOGBUT, TOGN, TRACKPREVIEW, bTheme::tui, uiBut::type, UI_BLOCK_LOOP, UI_BUT_DISABLED, UI_BUT_INACTIVE, UI_BUT_NODE_LINK, ui_draw_but_COLORBAND(), ui_draw_but_CURVE(), ui_draw_but_HISTOGRAM(), ui_draw_but_HSV_v(), ui_draw_but_HSVCIRCLE(), ui_draw_but_HSVCUBE(), ui_draw_but_IMAGE(), ui_draw_but_NORMAL(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_separator(), UI_EMBOSSN, UI_EMBOSSP, UI_GetTheme(), UI_GRAD_V_ALT, UI_HAS_ICON, UI_TEXT_LEFT, UI_TEXTINPUT, UI_WTYPE_BOX, UI_WTYPE_EXEC, UI_WTYPE_ICON, UI_WTYPE_LABEL, UI_WTYPE_LISTITEM, UI_WTYPE_MENU_ICON_RADIO, UI_WTYPE_MENU_ITEM, UI_WTYPE_MENU_NODE_LINK, UI_WTYPE_MENU_RADIO, UI_WTYPE_NAME, UI_WTYPE_NUMBER, UI_WTYPE_OPTION, UI_WTYPE_PROGRESSBAR, UI_WTYPE_PULLDOWN, UI_WTYPE_RADIO, UI_WTYPE_REGULAR, UI_WTYPE_SCROLL, UI_WTYPE_SLIDER, UI_WTYPE_SWATCH, UI_WTYPE_TOGGLE, VECTORSCOPE, WAVEFORM, uiWidgetType::wcol, ThemeUI::wcol_menu_back, ThemeUI::wcol_menu_item, ThemeUI::wcol_regular, uiWidgetType::wcol_theme, uiStyle::widget, widget_disabled(), widget_draw_extra_mask(), widget_draw_text_icon(), widget_link(), widget_roundbox_set(), widget_state_option_menu(), widget_type(), and uiStyle::widgetlabel.

static void ui_draw_but_HSV_v ( uiBut but,
rcti rect 
) [static]
static void ui_draw_but_HSVCIRCLE ( uiBut but,
uiWidgetColors wcol,
rcti rect 
) [static]
static void ui_draw_but_HSVCUBE ( uiBut but,
rcti rect 
) [static]
void ui_draw_gradient ( rcti rect,
const float  hsv[3],
int  type,
float  alpha 
)
void ui_draw_link_bezier ( rcti rect)

Definition at line 2190 of file interface_widgets.c.

References LINK_RESOL, and ui_link_bezier_points().

Referenced by ui_draw_linkline(), and widget_link().

void ui_draw_menu_back ( uiStyle UNUSEDstyle,
uiBlock block,
rcti rect 
)
void ui_draw_menu_item ( uiFontStyle fstyle,
rcti rect,
const char *  name,
int  iconid,
int  state 
)
void ui_draw_preview_item ( uiFontStyle fstyle,
rcti rect,
const char *  name,
int  iconid,
int  state 
)
void ui_draw_search_back ( uiStyle UNUSEDstyle,
uiBlock block,
rcti rect 
)
static void ui_draw_separator ( rcti rect,
uiWidgetColors wcol 
) [static]

Definition at line 2120 of file interface_widgets.c.

References sdrawline(), uiWidgetColors::text, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by ui_draw_but().

static void ui_hsv_cursor ( float  x,
float  y 
) [static]
void ui_hsvcircle_vals_from_pos ( float *  valrad,
float *  valdist,
rcti rect,
float  mx,
float  my 
)
int ui_link_bezier_points ( rcti rect,
float  coord_array[][2],
int  resol 
)
static void ui_text_label_rightclip ( uiFontStyle fstyle,
uiBut but,
rcti rect 
) [static]
static void ui_text_leftclip ( uiFontStyle fstyle,
uiBut but,
rcti rect 
) [static]
void ui_widget_color_init ( ThemeUI tui)
void uiWidgetScrollDraw ( uiWidgetColors wcol,
rcti rect,
rcti slider,
int  state 
)
static void widget_box ( uiBut but,
uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]
static void widget_but ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]

Definition at line 2715 of file interface_widgets.c.

References round_box_edges(), widget_init(), and widgetbase_draw().

Referenced by widget_type().

static void widget_check_trias ( uiWidgetTrias tria,
rcti rect 
) [static]
static void widget_disabled ( rcti rect) [static]

Definition at line 2772 of file interface_widgets.c.

References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by ui_draw_but().

static void widget_draw_extra_mask ( const bContext C,
uiBut but,
uiWidgetType wt,
rcti rect 
) [static]
static void widget_draw_icon ( uiBut but,
BIFIconID  icon,
float  alpha,
rcti rect 
) [static]
static void widget_draw_preview ( BIFIconID  icon,
float   UNUSEDalpha,
rcti rect 
) [static]
static void widget_draw_text ( uiFontStyle fstyle,
uiWidgetColors wcol,
uiBut but,
rcti rect 
) [static]
static void widget_draw_text_icon ( uiFontStyle fstyle,
uiWidgetColors wcol,
uiBut but,
rcti rect 
) [static]
static void widget_icon_has_anim ( uiBut UNUSEDbut,
uiWidgetColors wcol,
rcti rect,
int  state,
int   UNUSEDroundboxalign 
) [static]
static void widget_init ( uiWidgetBase wtb) [static]
static void widget_link ( uiBut but,
uiWidgetColors UNUSEDwcol,
rcti rect,
int   UNUSEDstate,
int   UNUSEDroundboxalign 
) [static]
static void widget_list_itembut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int   UNUSEDroundboxalign 
) [static]
static void widget_menu_back ( uiWidgetColors wcol,
rcti rect,
int  flag,
int  direction 
) [static]
static void widget_menu_itembut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int   UNUSEDroundboxalign 
) [static]

Definition at line 2614 of file interface_widgets.c.

References uiWidgetBase::outline, round_box_edges(), widget_init(), and widgetbase_draw().

Referenced by widget_type().

static void widget_menu_trias ( uiWidgetTrias tria,
rcti rect 
) [static]
static void widget_menubut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]
static void widget_menuiconbut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]

Definition at line 2563 of file interface_widgets.c.

References round_box_edges(), widget_init(), and widgetbase_draw().

Referenced by widget_type().

static void widget_menunodebut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]
static void widget_num_tria ( uiWidgetTrias tria,
rcti rect,
float  triasize,
char  where 
) [static]
static void widget_numbut ( uiWidgetColors wcol,
rcti rect,
int  state,
int  roundboxalign 
) [static]
static void widget_numslider ( uiBut but,
uiWidgetColors wcol,
rcti rect,
int  state,
int  roundboxalign 
) [static]
static void widget_optionbut ( uiWidgetColors wcol,
rcti rect,
int  state,
int   UNUSEDroundboxalign 
) [static]
static void widget_progressbar ( uiBut but,
uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int   UNUSEDroundboxalign 
) [static]
static void widget_pulldownbut ( uiWidgetColors wcol,
rcti rect,
int  state,
int   UNUSEDroundboxalign 
) [static]
static void widget_radiobut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]

Definition at line 2673 of file interface_widgets.c.

References round_box_edges(), widget_init(), and widgetbase_draw().

Referenced by widget_type().

static int widget_roundbox_set ( uiBut but,
rcti rect 
) [static]
static void widget_roundbut ( uiWidgetColors wcol,
rcti rect,
int   UNUSEDstate,
int  roundboxalign 
) [static]

Definition at line 2728 of file interface_widgets.c.

References round_box_edges(), widget_init(), and widgetbase_draw().

Referenced by widget_type().

static void widget_scroll ( uiBut but,
uiWidgetColors wcol,
rcti rect,
int  state,
int   UNUSEDroundboxalign 
) [static]
static void widget_scroll_circle ( uiWidgetTrias tria,
rcti rect,
float  triasize,
char  where 
) [static]
static void widget_softshadow ( rcti rect,
int  roundboxalign,
float  radin,
float  radout 
) [static]
static void widget_state ( uiWidgetType wt,
int  state 
) [static]
static void widget_state_blend ( char  cp[3],
const char  cpstate[3],
const float  fac 
) [static]

Definition at line 1537 of file interface_widgets.c.

Referenced by widget_state(), and widget_state_numslider().

static void widget_state_label ( uiWidgetType wt,
int  state 
) [static]
static void widget_state_menu_item ( uiWidgetType wt,
int  state 
) [static]
static void widget_state_nothing ( uiWidgetType wt,
int   UNUSEDstate 
) [static]

Definition at line 1657 of file interface_widgets.c.

References uiWidgetType::wcol, and uiWidgetType::wcol_theme.

Referenced by widget_type().

static void widget_state_numslider ( uiWidgetType wt,
int  state 
) [static]
static void widget_state_option_menu ( uiWidgetType wt,
int  state 
) [static]
static void widget_state_pulldown ( uiWidgetType wt,
int  state 
) [static]
static void widget_swatch ( uiBut but,
uiWidgetColors wcol,
rcti rect,
int  state,
int  roundboxalign 
) [static]
static void widget_textbut ( uiWidgetColors wcol,
rcti rect,
int  state,
int  roundboxalign 
) [static]
static void widget_trias_draw ( uiWidgetTrias tria) [static]

Definition at line 545 of file interface_widgets.c.

References uiWidgetTrias::index, uiWidgetTrias::tot, and uiWidgetTrias::vec.

Referenced by widgetbase_draw().

static uiWidgetType* widget_type ( uiWidgetTypeEnum  type) [static]

Definition at line 2789 of file interface_widgets.c.

References uiWidgetType::custom, uiWidgetType::draw, NULL, uiWidgetType::state, uiWidgetType::text, bTheme::tui, UI_GetTheme(), UI_WTYPE_BOX, UI_WTYPE_EXEC, UI_WTYPE_FILENAME, UI_WTYPE_ICON, UI_WTYPE_LABEL, UI_WTYPE_LISTITEM, UI_WTYPE_MENU_BACK, UI_WTYPE_MENU_ICON_RADIO, UI_WTYPE_MENU_ITEM, UI_WTYPE_MENU_NODE_LINK, UI_WTYPE_MENU_POINTER_LINK, UI_WTYPE_MENU_RADIO, UI_WTYPE_NAME, UI_WTYPE_NAME_LINK, UI_WTYPE_NORMAL, UI_WTYPE_NUMBER, UI_WTYPE_OPTION, UI_WTYPE_POINTER_LINK, UI_WTYPE_PROGRESSBAR, UI_WTYPE_PULLDOWN, UI_WTYPE_RADIO, UI_WTYPE_REGULAR, UI_WTYPE_RGB_PICKER, UI_WTYPE_SCROLL, UI_WTYPE_SLIDER, UI_WTYPE_SWATCH, UI_WTYPE_TOGGLE, ThemeUI::wcol_box, ThemeUI::wcol_list_item, ThemeUI::wcol_menu, ThemeUI::wcol_menu_back, ThemeUI::wcol_menu_item, ThemeUI::wcol_num, ThemeUI::wcol_numslider, ThemeUI::wcol_option, ThemeUI::wcol_progress, ThemeUI::wcol_pulldown, ThemeUI::wcol_radio, ThemeUI::wcol_regular, ThemeUI::wcol_scroll, ThemeUI::wcol_state, uiWidgetType::wcol_state, ThemeUI::wcol_text, uiWidgetType::wcol_theme, ThemeUI::wcol_toggle, ThemeUI::wcol_tool, widget_box(), widget_but(), widget_draw_text_icon(), widget_icon_has_anim(), widget_list_itembut(), widget_menu_back(), widget_menu_itembut(), widget_menubut(), widget_menuiconbut(), widget_menunodebut(), widget_numbut(), widget_numslider(), widget_optionbut(), widget_progressbar(), widget_pulldownbut(), widget_radiobut(), widget_roundbut(), widget_scroll(), widget_state(), widget_state_label(), widget_state_menu_item(), widget_state_nothing(), widget_state_numslider(), widget_state_pulldown(), widget_swatch(), and widget_textbut().

Referenced by ui_draw_but(), ui_draw_menu_back(), ui_draw_menu_item(), ui_draw_preview_item(), and ui_draw_search_back().

static void widget_verts_to_quad_strip ( uiWidgetBase wtb,
const int  totvert,
float  quad_strip[WIDGET_SIZE_MAX *2+2][2] 
) [static]
static void widget_verts_to_quad_strip_open ( uiWidgetBase wtb,
const int  totvert,
float  quad_strip[WIDGET_SIZE_MAX *2][2] 
) [static]

Definition at line 634 of file interface_widgets.c.

References uiWidgetBase::outer_v.

Referenced by widget_softshadow(), and widgetbase_draw().

static void widgetbase_draw ( uiWidgetBase wtb,
uiWidgetColors wcol 
) [static]
static void widgetbase_outline ( uiWidgetBase wtb) [static]

Variable Documentation

unsigned int check_tria_face[4][3] [static]
Initial value:
 {
{3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3}}

Definition at line 166 of file interface_widgets.c.

Referenced by widget_check_trias().

float check_tria_vert[6][2] [static]
Initial value:
 {
{-0.578579, 0.253369},  {-0.392773, 0.412794},  {-0.004241, -0.328551}, 
{-0.003001, 0.034320},  {1.055313, 0.864744},   {0.866408, 1.026895}}

Definition at line 162 of file interface_widgets.c.

Referenced by widget_check_trias().

GLubyte checker_stipple_sml[32 *32/8]
Initial value:
{
    255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
    255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
    0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
    0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
    255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
    255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
    0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
    0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
}

Definition at line 169 of file interface_widgets.c.

Referenced by DisplayBuffer::draw_transparency_grid(), ui_draw_but_COLORBAND(), and widgetbase_draw().

float cornervec[WIDGET_CURVE_RESOLU][2] [static]
Initial value:
 {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169},
{0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}

Definition at line 130 of file interface_widgets.c.

Referenced by round_box__edges(), and round_box_shadow_edges().

float jit[WIDGET_AA_JITTER][2] [static]
Initial value:
 {
    { 0.468813 , -0.481430}, {-0.155755 , -0.352820},
    { 0.219306 , -0.238501}, {-0.393286 , -0.110949},
    {-0.024699 ,  0.013908}, { 0.343805 ,  0.147431},
    {-0.272855 ,  0.269918}, { 0.095909 ,  0.388710}}

Definition at line 134 of file interface_widgets.c.

Referenced by distribute_threads_init_data(), give_jitter_tab(), init_render_jit(), make_jitter_weight_tab(), RE_zbuf_accumulate_vecblur(), RAS_MeshSlot::Split(), testshadowbuf(), ui_draw_anti_roundbox(), ui_draw_anti_tria(), widgetbase_draw(), zbuffer_abuf(), zbuffer_abuf_shadow(), and zbuffer_strands_abuf().

unsigned int menu_tria_face[2][3] = {{2, 0, 1}, {3, 5, 4}} [static]

Definition at line 160 of file interface_widgets.c.

Referenced by widget_menu_trias().

float menu_tria_vert[6][2] [static]
Initial value:
 {
{-0.41, 0.16}, {0.41, 0.16}, {0, 0.82}, 
{0, -0.82}, {-0.41, -0.16}, {0.41, -0.16}}

Definition at line 156 of file interface_widgets.c.

Referenced by widget_menu_trias().

unsigned int num_tria_face[1][3] [static]
Initial value:
 {
{0, 1, 2}}

Definition at line 143 of file interface_widgets.c.

Referenced by widget_num_tria().

float num_tria_vert[3][2] [static]
Initial value:
 { 
{-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353}}

Definition at line 140 of file interface_widgets.c.

Referenced by widget_num_tria().

unsigned int scroll_circle_face[14][3] [static]
Initial value:
 {
{0, 1, 2}, {2, 0, 3}, {3, 0, 15}, {3, 15, 4}, {4, 15, 14}, {4, 14, 5}, {5, 14, 13}, {5, 13, 6}, 
{6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9}}

Definition at line 152 of file interface_widgets.c.

Referenced by widget_scroll_circle().

float scroll_circle_vert[16][2] [static]
Initial value:
 {
{0.382684, 0.923879}, {0.000001, 1.000000}, {-0.382683, 0.923880}, {-0.707107, 0.707107},
{-0.923879, 0.382684}, {-1.000000, 0.000000}, {-0.923880, -0.382684}, {-0.707107, -0.707107},
{-0.382683, -0.923880}, {0.000000, -1.000000}, {0.382684, -0.923880}, {0.707107, -0.707107},
{0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107}}

Definition at line 146 of file interface_widgets.c.

Referenced by widget_scroll_circle().

struct uiWidgetColors wcol_box [static]
Initial value:
 {
    {25, 25, 25, 255},
    {128, 128, 128, 255},
    {100, 100, 100, 255},
    {25, 25, 25, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    0,
    0, 0
}

Definition at line 1432 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_list_item [static]
Initial value:
 {
    {0, 0, 0, 255},
    {0, 0, 0, 0},
    {86, 128, 194, 255},
    {0, 0, 0, 255},
    
    {0, 0, 0, 255},
    {0, 0, 0, 255},
    
    0,
    0, 0
}

Definition at line 1484 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_menu [static]
Initial value:
 {
    {0, 0, 0, 255},
    {70, 70, 70, 255},
    {70, 70, 70, 255},
    {255, 255, 255, 255},
    
    {255, 255, 255, 255},
    {204, 204, 204, 255},
    
    1,
    15, -15
}

Definition at line 1337 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_menu_back [static]
Initial value:
 {
    {0, 0, 0, 255},
    {25, 25, 25, 230},
    {45, 45, 45, 230},
    {100, 100, 100, 255},
    
    {160, 160, 160, 255},
    {255, 255, 255, 255},
    
    0,
    25, -20
}

Definition at line 1379 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_menu_item [static]
Initial value:
 {
    {0, 0, 0, 255},
    {0, 0, 0, 0},
    {86, 128, 194, 255},
    {255, 255, 255, 255},
    
    {255, 255, 255, 255},
    {0, 0, 0, 255},
    
    1,
    38, 0
}

Definition at line 1365 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_num [static]
Initial value:
 {
    {25, 25, 25, 255},
    {180, 180, 180, 255},
    {153, 153, 153, 255},
    {90, 90, 90, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    -20, 0
}

Definition at line 1284 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_numslider [static]
Initial value:
 {
    {25, 25, 25, 255},
    {180, 180, 180, 255},
    {153, 153, 153, 255},
    {128, 128, 128, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    -20, 0
}

Definition at line 1297 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_option [static]
Initial value:
 {
    {0, 0, 0, 255},
    {70, 70, 70, 255},
    {70, 70, 70, 255},
    {255, 255, 255, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    15, -15
}

Definition at line 1323 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_progress [static]
Initial value:
 {
    {0, 0, 0, 255},
    {190, 190, 190, 255},
    {100, 100, 100, 180},
    {68, 68, 68, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    0,
    0, 0
}

Definition at line 1471 of file interface_widgets.c.

Referenced by init_userdef_do_versions(), and ui_widget_color_init().

struct uiWidgetColors wcol_pulldown [static]
Initial value:
 {
    {0, 0, 0, 255},
    {63, 63, 63, 255},
    {86, 128, 194, 255},
    {255, 255, 255, 255},
    
    {0, 0, 0, 255},
    {0, 0, 0, 255},
    
    0,
    25, -20
}

Definition at line 1351 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_radio [static]
Initial value:
 {
    {0, 0, 0, 255},
    {70, 70, 70, 255},
    {86, 128, 194, 255},
    {255, 255, 255, 255},
    
    {255, 255, 255, 255},
    {0, 0, 0, 255},
    
    1,
    15, -15
}

Definition at line 1393 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_regular [static]
Initial value:
 {
    {25, 25, 25, 255},
    {153, 153, 153, 255},
    {100, 100, 100, 255},
    {25, 25, 25, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    0,
    0, 0
}

Definition at line 1406 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_scroll [static]
Initial value:
 {
    {50, 50, 50, 180},
    {80, 80, 80, 180},
    {100, 100, 100, 180},
    {128, 128, 128, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    5, -5
}

Definition at line 1458 of file interface_widgets.c.

Referenced by ui_widget_color_init().

Initial value:
 {
    {115, 190, 76, 255},
    {90, 166, 51, 255},
    {240, 235, 100, 255},
    {215, 211, 75, 255},
    {180, 0, 255, 255},
    {153, 0, 230, 255},
    0.5f, 0.0f
}

Definition at line 1262 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_text [static]
Initial value:
 {
    {25, 25, 25, 255},
    {153, 153, 153, 255},
    {153, 153, 153, 255},
    {90, 90, 90, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    0, 25
}

Definition at line 1310 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_tmp [static]
Initial value:
 {
    {0, 0, 0, 255},
    {128, 128, 128, 255},
    {100, 100, 100, 255},
    {25, 25, 25, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    0,
    0, 0
}

Definition at line 1498 of file interface_widgets.c.

struct uiWidgetColors wcol_toggle [static]
Initial value:
 {
    {25, 25, 25, 255},
    {153, 153, 153, 255},
    {100, 100, 100, 255},
    {25, 25, 25, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    0,
    0, 0
}

Definition at line 1445 of file interface_widgets.c.

Referenced by ui_widget_color_init().

struct uiWidgetColors wcol_tool [static]
Initial value:
 {
    {25, 25, 25, 255},
    {153, 153, 153, 255},
    {100, 100, 100, 255},
    {25, 25, 25, 255},
    
    {0, 0, 0, 255},
    {255, 255, 255, 255},
    
    1,
    15, -15
}

Definition at line 1419 of file interface_widgets.c.

Referenced by ui_widget_color_init().