Blender
V3.3
|
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "ED_gizmo_library.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
Go to the source code of this file.
Classes | |
struct | NavigateGizmoInfo |
struct | NavigateWidgetGroup |
View2D Navigation Gizmo Group | |
A simpler version of VIEW3D_GGT_navigate Written to be used by different kinds of 2D view types. | |
#define | GIZMO_SIZE 80 |
#define | GIZMO_MINI_FAC 0.35f |
#define | GIZMO_MINI_OFFSET_FAC 0.38f |
enum | { GZ_INDEX_MOVE = 0 , GZ_INDEX_ZOOM = 1 , GZ_INDEX_TOTAL = 2 } |
static struct NavigateGizmoInfo | g_navigate_params_for_space_image [GZ_INDEX_TOTAL] |
static struct NavigateGizmoInfo | g_navigate_params_for_space_clip [GZ_INDEX_TOTAL] |
static struct NavigateGizmoInfo | g_navigate_params_for_view2d [GZ_INDEX_TOTAL] |
static struct NavigateGizmoInfo * | navigate_params_from_space_type (short space_type) |
static bool | WIDGETGROUP_navigate_poll (const bContext *C, wmGizmoGroupType *UNUSED(gzgt)) |
static void | WIDGETGROUP_navigate_setup (const bContext *UNUSED(C), wmGizmoGroup *gzgroup) |
static void | WIDGETGROUP_navigate_draw_prepare (const bContext *C, wmGizmoGroup *gzgroup) |
void | VIEW2D_GGT_navigate_impl (wmGizmoGroupType *gzgt, const char *idname) |
#define GIZMO_MINI_FAC 0.35f |
Definition at line 38 of file view2d_gizmo_navigate.cc.
#define GIZMO_MINI_OFFSET_FAC 0.38f |
Definition at line 40 of file view2d_gizmo_navigate.cc.
#define GIZMO_SIZE 80 |
Definition at line 36 of file view2d_gizmo_navigate.cc.
anonymous enum |
Enumerator | |
---|---|
GZ_INDEX_MOVE | |
GZ_INDEX_ZOOM | |
GZ_INDEX_TOTAL |
Definition at line 42 of file view2d_gizmo_navigate.cc.
|
static |
Definition at line 94 of file view2d_gizmo_navigate.cc.
References g_navigate_params_for_space_clip, g_navigate_params_for_space_image, g_navigate_params_for_view2d, SPACE_CLIP, and SPACE_IMAGE.
Referenced by WIDGETGROUP_navigate_setup().
void VIEW2D_GGT_navigate_impl | ( | struct wmGizmoGroupType * | gzgt, |
const char * | idname | ||
) |
Caller defines the name for gizmo group.
Definition at line 247 of file view2d_gizmo_navigate.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoGroupType::setup, WIDGETGROUP_navigate_draw_prepare(), WIDGETGROUP_navigate_poll(), WIDGETGROUP_navigate_setup(), WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL, WM_GIZMOGROUPTYPE_PERSISTENT, and WM_GIZMOGROUPTYPE_SCALE.
Referenced by CLIP_GGT_navigate(), IMAGE_GGT_navigate(), and SEQUENCER_GGT_navigate().
|
static |
Definition at line 206 of file view2d_gizmo_navigate.cc.
References ARRAY_SIZE, C, CTX_wm_region(), wmGizmoGroup::customdata, ED_region_visible_rect(), GIZMO_MINI_OFFSET_FAC, GIZMO_SIZE, NavigateWidgetGroup::gz_array, GZ_INDEX_MOVE, GZ_INDEX_ZOOM, wmGizmo::matrix_basis, NavigateWidgetGroup::rect_visible, NavigateWidgetGroup::state, UI_DPI_FAC, WM_GIZMO_HIDDEN, WM_gizmo_set_flag(), rcti::xmax, and rcti::ymax.
Referenced by VIEW2D_GGT_navigate_impl().
|
static |
Definition at line 116 of file view2d_gizmo_navigate.cc.
References blender::compositor::area(), C, CTX_wm_area(), SpaceSeq::gizmo_flag, SpaceImage::gizmo_flag, SEQ_GIZMO_HIDE, SEQ_GIZMO_HIDE_NAVIGATE, SI_GIZMO_HIDE, SI_GIZMO_HIDE_NAVIGATE, SPACE_IMAGE, SPACE_SEQ, and USER_SHOW_GIZMO_NAVIGATE.
Referenced by VIEW2D_GGT_navigate_impl().
|
static |
Definition at line 144 of file view2d_gizmo_navigate.cc.
References ARRAY_SIZE, wmGizmo::color, wmGizmo::color_hi, wmGizmoGroup::customdata, ED_GIZMO_BUTTON_SHOW_BACKDROP, ED_GIZMO_BUTTON_SHOW_OUTLINE, wmGizmo::flag, NavigateGizmoInfo::gizmo, GIZMO_MINI_FAC, GIZMO_SIZE, NavigateWidgetGroup::gz_array, GZ_INDEX_TOTAL, GZ_INDEX_ZOOM, wmGizmoGroupType::gzmap_params, NavigateGizmoInfo::icon, navigate_params_from_space_type(), NavigateGizmoInfo::opname, ot, wmGizmoOpElem::ptr, wmGizmo::ptr, NavigateWidgetGroup::region_size, RNA_boolean_set(), RNA_enum_set(), RNA_property_enum_set(), RNA_struct_find_property(), wmGizmo::scale_basis, wmGizmoMapType_Params::spaceid, TH_HEADER, TH_TEXT, wmGizmoGroup::type, UI_GetThemeColor3ubv(), UI_GetThemeColorShade3fv(), WM_GIZMO_DRAW_MODAL, WM_GIZMO_MOVE_CURSOR, WM_gizmo_new(), WM_gizmo_operator_get(), WM_gizmo_operator_set(), and WM_operatortype_find().
Referenced by VIEW2D_GGT_navigate_impl().
|
static |
Definition at line 1 of file view2d_gizmo_navigate.cc.
Referenced by navigate_params_from_space_type().
|
static |
Definition at line 1 of file view2d_gizmo_navigate.cc.
Referenced by navigate_params_from_space_type().
|
static |
Definition at line 1 of file view2d_gizmo_navigate.cc.
Referenced by navigate_params_from_space_type().