Blender V2.61 - r43446
|
#include <string.h>
#include "DNA_windowmanager_types.h"
#include "DNA_screen_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_screen.h"
#include "BKE_global.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_event_system.h"
#include "wm.h"
Go to the source code of this file.
Classes | |
struct | wmDropBoxMap |
Typedefs | |
typedef struct wmDropBoxMap | wmDropBoxMap |
Functions | |
ListBase * | WM_dropboxmap_find (const char *idname, int spaceid, int regionid) |
wmDropBox * | WM_dropbox_add (ListBase *lb, const char *idname, int(*poll)(bContext *, wmDrag *, wmEvent *), void(*copy)(wmDrag *, wmDropBox *)) |
void | wm_dropbox_free (void) |
wmDrag * | WM_event_start_drag (struct bContext *C, int icon, int type, void *poin, double value) |
void | WM_event_drag_image (wmDrag *drag, ImBuf *imb, float scale, int sx, int sy) |
static const char * | dropbox_active (bContext *C, ListBase *handlers, wmDrag *drag, wmEvent *event) |
static const char * | wm_dropbox_active (bContext *C, wmDrag *drag, wmEvent *event) |
static void | wm_drop_operator_options (bContext *C, wmDrag *drag, wmEvent *event) |
void | wm_drags_check_ops (bContext *C, wmEvent *event) |
static void | wm_drop_operator_draw (const char *name, int x, int y) |
static const char * | wm_drag_name (wmDrag *drag) |
static void | drag_rect_minmax (rcti *rect, int x1, int y1, int x2, int y2) |
void | wm_drags_draw (bContext *C, wmWindow *win, rcti *rect) |
Variables | |
static ListBase | dropboxes = {NULL, NULL} |
Definition in file wm_dragdrop.c.
typedef struct wmDropBoxMap wmDropBoxMap |
static void drag_rect_minmax | ( | rcti * | rect, |
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2 | ||
) | [static] |
Definition at line 280 of file wm_dragdrop.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wm_drags_draw().
static const char* dropbox_active | ( | bContext * | C, |
ListBase * | handlers, | ||
wmDrag * | drag, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 175 of file wm_dragdrop.c.
References wmEventHandler::dropboxes, ListBase::first, wmOperatorType::name, wmEventHandler::next, wmDropBox::next, NULL, wmDropBox::ot, and wmDropBox::poll.
Referenced by wm_dropbox_active().
static const char* wm_drag_name | ( | wmDrag * | drag | ) | [static] |
Definition at line 264 of file wm_dragdrop.c.
References ID::name, wmDrag::path, wmDrag::poin, wmDrag::type, WM_DRAG_ID, WM_DRAG_NAME, and WM_DRAG_PATH.
Referenced by wm_drags_draw().
Definition at line 239 of file wm_dragdrop.c.
References CTX_wm_manager(), wmWindowManager::drags, ListBase::first, wmDrag::next, and wm_drop_operator_options().
Referenced by wm_event_do_handlers().
Definition at line 294 of file wm_dragdrop.c.
References CTX_wm_manager(), drag_rect_minmax(), wmWindowManager::drags, wmWindow::eventstate, ListBase::first, glaDrawPixelsTexScaled(), wmDrag::icon, wmDrag::imb, wmDrag::next, wmDrag::opname, ImBuf::rect, wmDrag::scale, wmDrag::sx, wmDrag::sy, UI_DrawString(), UI_GetStringWidth(), UI_icon_draw_aspect(), simple_enum_gen::w, wm_drag_name(), wm_drop_operator_draw(), ImBuf::x, wmEvent::x, rcti::xmax, rcti::xmin, ImBuf::y, wmEvent::y, rcti::ymax, and rcti::ymin.
Referenced by wm_method_draw_overlap_all(), and wm_method_draw_triple().
static void wm_drop_operator_draw | ( | const char * | name, |
int | x, | ||
int | y | ||
) | [static] |
Definition at line 251 of file wm_dragdrop.c.
References UI_CNR_ALL, UI_DrawString(), UI_GetStringWidth(), UI_RB_ALPHA, uiRoundBox(), and uiSetRoundBox().
Referenced by wm_drags_draw().
Definition at line 211 of file wm_dragdrop.c.
References BLI_strncpy(), CTX_wm_window(), FILE_MAX, wmDrag::opname, wmWindow::sizex, wmWindow::sizey, UI_but_active_drop_name(), wm_dropbox_active(), wmEvent::x, and wmEvent::y.
Referenced by wm_drags_check_ops().
Definition at line 191 of file wm_dragdrop.c.
References CTX_wm_area(), CTX_wm_region(), CTX_wm_window(), dropbox_active(), ARegion::handlers, ScrArea::handlers, wmWindow::handlers, and NULL.
Referenced by wm_drop_operator_options().
wmDropBox* WM_dropbox_add | ( | ListBase * | lb, |
const char * | idname, | ||
int(*)(bContext *, wmDrag *, wmEvent *) | poll, | ||
void(*)(wmDrag *, wmDropBox *) | copy | ||
) |
Definition at line 102 of file wm_dragdrop.c.
References BLI_addtail(), copy(), wmDropBox::copy, MEM_callocN(), MEM_freeN(), NULL, wmDropBox::opcontext, wmDropBox::ot, wmDropBox::poll, wmDropBox::properties, wmDropBox::ptr, WM_OP_INVOKE_DEFAULT, WM_operator_properties_alloc(), and WM_operatortype_find().
Referenced by console_dropboxes(), ED_keymap_screen(), image_dropboxes(), node_dropboxes(), sequencer_dropboxes(), text_dropboxes(), and view3d_dropboxes().
void wm_dropbox_free | ( | void | ) |
Definition at line 124 of file wm_dragdrop.c.
References BLI_freelistN(), wmDropBoxMap::dropboxes, ListBase::first, MEM_freeN(), wmDropBoxMap::next, wmDropBox::next, wmDropBox::ptr, and WM_operator_properties_free().
Referenced by WM_exit_ext().
ListBase* WM_dropboxmap_find | ( | const char * | idname, |
int | spaceid, | ||
int | regionid | ||
) |
Definition at line 82 of file wm_dragdrop.c.
References BLI_addtail(), BLI_strncpy(), wmDropBoxMap::dropboxes, ListBase::first, wmDropBoxMap::idname, KMAP_MAX_NAME, MEM_callocN(), wmDropBoxMap::next, wmDropBoxMap::regionid, and wmDropBoxMap::spaceid.
Referenced by console_dropboxes(), console_main_area_init(), ED_keymap_screen(), image_dropboxes(), image_init(), node_dropboxes(), node_main_area_init(), sequencer_dropboxes(), sequencer_main_area_init(), text_dropboxes(), text_main_area_init(), view3d_dropboxes(), view3d_main_area_init(), and wm_window_add_ghostwindows().
Definition at line 166 of file wm_dragdrop.c.
References wmDrag::imb, wmDrag::scale, wmDrag::sx, and wmDrag::sy.
Referenced by ui_but_start_drag().
wmDrag* WM_event_start_drag | ( | struct bContext * | C, |
int | icon, | ||
int | type, | ||
void * | poin, | ||
double | value | ||
) | [read] |
Definition at line 146 of file wm_dragdrop.c.
References BLI_addtail(), BLI_strncpy(), CTX_wm_manager(), wmWindowManager::drags, FILE_MAX, wmDrag::icon, MEM_callocN(), wmDrag::path, wmDrag::poin, wmDrag::type, wmDrag::value, and WM_DRAG_PATH.
Referenced by ghost_event_proc(), and ui_but_start_drag().
Definition at line 66 of file wm_dragdrop.c.
Referenced by WM_event_add_dropbox_handler().