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/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h94
1 files changed, 38 insertions, 56 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 984d3409554..bc4b484f777 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -72,14 +72,10 @@ typedef struct uiBut uiBut;
typedef struct uiButExtraOpIcon uiButExtraOpIcon;
typedef struct uiLayout uiLayout;
typedef struct uiPopupBlockHandle uiPopupBlockHandle;
-/* C handle for C++ #ui::AbstractTreeView type. */
-typedef struct uiTreeViewHandle uiTreeViewHandle;
-/* C handle for C++ #ui::AbstractTreeViewItem type. */
-typedef struct uiTreeViewItemHandle uiTreeViewItemHandle;
-/* C handle for C++ #ui::AbstractGridView type. */
-typedef struct uiGridViewHandle uiGridViewHandle;
-/* C handle for C++ #ui::AbstractGridViewItem type. */
-typedef struct uiGridViewItemHandle uiGridViewItemHandle;
+/* C handle for C++ #ui::AbstractView type. */
+typedef struct uiViewHandle uiViewHandle;
+/* C handle for C++ #ui::AbstractViewItem type. */
+typedef struct uiViewItemHandle uiViewItemHandle;
/* Defines */
@@ -89,7 +85,7 @@ typedef struct uiGridViewItemHandle uiGridViewItemHandle;
/* Separator for text in search menus (right pointing arrow).
* keep in sync with `string_search.cc`. */
-#define UI_MENU_ARROW_SEP "\xe2\x96\xb6"
+#define UI_MENU_ARROW_SEP "\xe2\x96\xb8"
/* names */
#define UI_MAX_DRAW_STR 400
@@ -358,7 +354,7 @@ typedef enum {
UI_BTYPE_LABEL = 20 << 9,
UI_BTYPE_KEY_EVENT = 24 << 9,
UI_BTYPE_HSVCUBE = 26 << 9,
- /** menu (often used in headers), **_MENU /w different draw-type */
+ /** Menu (often used in headers), `*_MENU` with different draw-type. */
UI_BTYPE_PULLDOWN = 27 << 9,
UI_BTYPE_ROUNDBOX = 28 << 9,
UI_BTYPE_COLORBAND = 30 << 9,
@@ -393,10 +389,8 @@ typedef enum {
/** Resize handle (resize uilist). */
UI_BTYPE_GRIP = 57 << 9,
UI_BTYPE_DECORATOR = 58 << 9,
- /* An item in a tree view. Parent items may be collapsible. */
- UI_BTYPE_TREEROW = 59 << 9,
- /* An item in a grid view. */
- UI_BTYPE_GRID_TILE = 60 << 9,
+ /* An item a view (see #ui::AbstractViewItem). */
+ UI_BTYPE_VIEW_ITEM = 59 << 9,
} eButType;
#define BUTTYPE (63 << 9)
@@ -1687,8 +1681,6 @@ int UI_search_items_find_index(uiSearchItems *items, const char *name);
*/
void UI_but_hint_drawstr_set(uiBut *but, const char *string);
-void UI_but_treerow_indentation_set(uiBut *but, int indentation);
-
void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4]);
void UI_but_number_step_size_set(uiBut *but, float step_size);
@@ -2491,7 +2483,7 @@ enum uiTemplateListFlags {
ENUM_OPERATORS(enum uiTemplateListFlags, UI_TEMPLATE_LIST_FLAGS_LAST);
void uiTemplateList(uiLayout *layout,
- struct bContext *C,
+ const struct bContext *C,
const char *listtype_name,
const char *list_id,
struct PointerRNA *dataptr,
@@ -2505,7 +2497,7 @@ void uiTemplateList(uiLayout *layout,
int columns,
enum uiTemplateListFlags flags);
struct uiList *uiTemplateList_ex(uiLayout *layout,
- struct bContext *C,
+ const struct bContext *C,
const char *listtype_name,
const char *list_id,
struct PointerRNA *dataptr,
@@ -2575,7 +2567,7 @@ enum {
UI_TEMPLATE_ASSET_DRAW_NO_LIBRARY = (1 << 2),
};
void uiTemplateAssetView(struct uiLayout *layout,
- struct bContext *C,
+ const struct bContext *C,
const char *list_id,
struct PointerRNA *asset_library_dataptr,
const char *asset_library_propname,
@@ -3204,54 +3196,44 @@ void UI_interface_tag_script_reload(void);
void UI_block_views_listen(const uiBlock *block,
const struct wmRegionListenerParams *listener_params);
-bool UI_grid_view_item_is_active(const uiGridViewItemHandle *item_handle);
-bool UI_tree_view_item_is_active(const uiTreeViewItemHandle *item);
-bool UI_grid_view_item_matches(const uiGridViewItemHandle *a, const uiGridViewItemHandle *b);
-bool UI_tree_view_item_matches(const uiTreeViewItemHandle *a, const uiTreeViewItemHandle *b);
-/**
- * Attempt to start dragging the tree-item \a item_. This will not work if the tree item doesn't
- * support dragging, i.e. it won't create a drag-controller upon request.
- * \return True if dragging started successfully, otherwise false.
- */
-bool UI_tree_view_item_drag_start(struct bContext *C, uiTreeViewItemHandle *item_);
-bool UI_tree_view_item_can_drop(const uiTreeViewItemHandle *item_,
- const struct wmDrag *drag,
- const char **r_disabled_hint);
-char *UI_tree_view_item_drop_tooltip(const uiTreeViewItemHandle *item, const struct wmDrag *drag);
-/**
- * Let a tree-view item handle a drop event.
- * \return True if the drop was handled by the tree-view item.
- */
-bool UI_tree_view_item_drop_handle(struct bContext *C,
- const uiTreeViewItemHandle *item_,
- const struct ListBase *drags);
+bool UI_view_item_is_active(const uiViewItemHandle *item_handle);
+bool UI_view_item_matches(const uiViewItemHandle *a_handle, const uiViewItemHandle *b_handle);
/**
- * Can \a item_handle be renamed right now? Not that this isn't just a mere wrapper around
- * #AbstractTreeViewItem::can_rename(). This also checks if there is another item being renamed,
+ * Can \a item_handle be renamed right now? Note that this isn't just a mere wrapper around
+ * #AbstractViewItem::supports_renaming(). This also checks if there is another item being renamed,
* and returns false if so.
*/
-bool UI_tree_view_item_can_rename(const uiTreeViewItemHandle *item_handle);
-void UI_tree_view_item_begin_rename(uiTreeViewItemHandle *item_handle);
+bool UI_view_item_can_rename(const uiViewItemHandle *item_handle);
+void UI_view_item_begin_rename(uiViewItemHandle *item_handle);
-void UI_tree_view_item_context_menu_build(struct bContext *C,
- const uiTreeViewItemHandle *item,
- uiLayout *column);
+void UI_view_item_context_menu_build(struct bContext *C,
+ const uiViewItemHandle *item_handle,
+ uiLayout *column);
/**
- * \param xy: Coordinate to find a tree-row item at, in window space.
+ * Attempt to start dragging \a item_. This will not work if the view item doesn't
+ * support dragging, i.e. if it won't create a drag-controller upon request.
+ * \return True if dragging started successfully, otherwise false.
*/
-uiTreeViewItemHandle *UI_block_tree_view_find_item_at(const struct ARegion *region,
- const int xy[2]) ATTR_NONNULL(1, 2);
-uiTreeViewItemHandle *UI_block_tree_view_find_active_item(const struct ARegion *region);
-
+bool UI_view_item_drag_start(struct bContext *C, const uiViewItemHandle *item_);
+bool UI_view_item_can_drop(const uiViewItemHandle *item_,
+ const struct wmDrag *drag,
+ const char **r_disabled_hint);
+char *UI_view_item_drop_tooltip(const uiViewItemHandle *item, const struct wmDrag *drag);
/**
- * Listen to \a notifier, returning true if the region should redraw.
+ * Let a view item handle a drop event.
+ * \return True if the drop was handled by the view item.
*/
-bool UI_tree_view_listen_should_redraw(const uiTreeViewHandle *view, const wmNotifier *notifier);
+bool UI_view_item_drop_handle(struct bContext *C,
+ const uiViewItemHandle *item_,
+ const struct ListBase *drags);
+
/**
- * Listen to \a notifier, returning true if the region should redraw.
+ * \param xy: Coordinate to find a view item at, in window space.
*/
-bool UI_grid_view_listen_should_redraw(const uiGridViewHandle *view, const wmNotifier *notifier);
+uiViewItemHandle *UI_region_views_find_item_at(const struct ARegion *region, const int xy[2])
+ ATTR_NONNULL();
+uiViewItemHandle *UI_region_views_find_active_item(const struct ARegion *region);
#ifdef __cplusplus
}