Blender V2.61 - r43446
Defines | Functions

area.c File Reference

#include <string.h>
#include <stdio.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "wm_subwindow.h"
#include "ED_screen.h"
#include "ED_screen_types.h"
#include "ED_space_api.h"
#include "ED_types.h"
#include "ED_fileselect.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "BLF_api.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "screen_intern.h"

Go to the source code of this file.

Defines

#define AZONEPAD_EDGE   4
#define AZONEPAD_ICON   9
#define AZONEPAD_TAB_PLUSW   14
#define AZONEPAD_TAB_PLUSH   14
#define AZONEPAD_TABW   18
#define AZONEPAD_TABH   7
#define AZONEPAD_TRIAW   16
#define AZONEPAD_TRIAH   9

Functions

static void region_draw_emboss (ARegion *ar, rcti *scirct)
void ED_region_pixelspace (ARegion *ar)
void ED_region_do_listen (ARegion *ar, wmNotifier *note)
void ED_area_do_listen (ScrArea *sa, wmNotifier *note)
void ED_area_do_refresh (bContext *C, ScrArea *sa)
void ED_area_overdraw_flush (ScrArea *sa, ARegion *ar)
static void area_draw_azone (short x1, short y1, short x2, short y2)
static void region_draw_azone_icon (AZone *az)
static void draw_azone_plus (float x1, float y1, float x2, float y2)
static void region_draw_azone_tab_plus (AZone *az)
static void region_draw_azone_tab (AZone *az)
static void region_draw_azone_tria (AZone *az)
void ED_area_overdraw (bContext *C)
void region_scissor_winrct (ARegion *ar, rcti *winrct)
void ED_region_set (const bContext *C, ARegion *ar)
void ED_region_do_draw (bContext *C, ARegion *ar)
void ED_region_tag_redraw (ARegion *ar)
void ED_region_tag_redraw_overlay (ARegion *ar)
void ED_region_tag_redraw_partial (ARegion *ar, rcti *rct)
void ED_area_tag_redraw (ScrArea *sa)
void ED_area_tag_redraw_regiontype (ScrArea *sa, int regiontype)
void ED_area_tag_refresh (ScrArea *sa)
void ED_area_headerprint (ScrArea *sa, const char *str)
static void area_azone_initialize (ScrArea *sa)
static void region_azone_edge (AZone *az, ARegion *ar)
static void region_azone_icon (ScrArea *sa, AZone *az, ARegion *ar)
static void region_azone_tab_plus (ScrArea *sa, AZone *az, ARegion *ar)
static void region_azone_tab (ScrArea *sa, AZone *az, ARegion *ar)
static void region_azone_tria (ScrArea *sa, AZone *az, ARegion *ar)
static void region_azone_initialize (ScrArea *sa, ARegion *ar, AZEdge edge)
static void region_azone_add (ScrArea *sa, ARegion *ar, int alignment)
static int rct_fits (rcti *rect, char dir, int size)
static void region_rect_recursive (ScrArea *sa, ARegion *ar, rcti *remainder, int quad)
static void area_calc_totrct (ScrArea *sa, int sizex, int sizey)
static void region_subwindow (wmWindow *win, ARegion *ar)
static void ed_default_handlers (wmWindowManager *wm, ScrArea *sa, ListBase *handlers, int flag)
void ED_area_initialize (wmWindowManager *wm, wmWindow *win, ScrArea *sa)
void ED_region_init (bContext *C, ARegion *ar)
void ED_region_toggle_hidden (bContext *C, ARegion *ar)
void area_copy_data (ScrArea *sa1, ScrArea *sa2, int swap_space)
void ED_area_swapspace (bContext *C, ScrArea *sa1, ScrArea *sa2)
void ED_area_newspace (bContext *C, ScrArea *sa, int type)
void ED_area_prevspace (bContext *C, ScrArea *sa)
static const char * editortype_pup (void)
static void spacefunc (struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
int ED_area_header_switchbutton (const bContext *C, uiBlock *block, int yco)
int ED_area_header_standardbuttons (const bContext *C, uiBlock *block, int yco)
void ED_region_panels (const bContext *C, ARegion *ar, int vertical, const char *context, int contextnr)
void ED_region_panels_init (wmWindowManager *wm, ARegion *ar)
void ED_region_header (const bContext *C, ARegion *ar)
void ED_region_header_init (ARegion *ar)
int ED_area_headersize (void)
void ED_region_info_draw (ARegion *ar, const char *text, int block, float alpha)

Detailed Description

Definition in file area.c.


Define Documentation

#define AZONEPAD_EDGE   4

Definition at line 621 of file area.c.

Referenced by region_azone_edge().

#define AZONEPAD_ICON   9

Definition at line 622 of file area.c.

Referenced by region_azone_icon().

#define AZONEPAD_TAB_PLUSH   14

Definition at line 715 of file area.c.

Referenced by region_azone_tab_plus().

#define AZONEPAD_TAB_PLUSW   14

Definition at line 714 of file area.c.

Referenced by region_azone_tab_plus().

#define AZONEPAD_TABH   7

Definition at line 760 of file area.c.

Referenced by region_azone_tab().

#define AZONEPAD_TABW   18

Definition at line 759 of file area.c.

Referenced by region_azone_tab().

#define AZONEPAD_TRIAH   9

Definition at line 804 of file area.c.

Referenced by region_azone_tria().

#define AZONEPAD_TRIAW   16

Definition at line 803 of file area.c.

Referenced by region_azone_tria().


Function Documentation

static void area_azone_initialize ( ScrArea sa) [static]
static void area_calc_totrct ( ScrArea sa,
int  sizex,
int  sizey 
) [static]
void area_copy_data ( ScrArea sa1,
ScrArea sa2,
int  swap_space 
)
static void area_draw_azone ( short  x1,
short  y1,
short  x2,
short  y2 
) [static]

Definition at line 170 of file area.c.

References fabs(), and fdrawline().

Referenced by ED_area_overdraw().

static void draw_azone_plus ( float  x1,
float  y1,
float  x2,
float  y2 
) [static]

Definition at line 233 of file area.c.

Referenced by region_draw_azone_tab_plus().

void ED_area_do_listen ( ScrArea sa,
wmNotifier note 
)

Definition at line 133 of file area.c.

References SpaceType::listener, and ScrArea::type.

Referenced by wm_event_do_notifiers().

void ED_area_do_refresh ( bContext C,
ScrArea sa 
)

Definition at line 142 of file area.c.

References ScrArea::do_refresh, SpaceType::refresh, and ScrArea::type.

Referenced by wm_event_do_notifiers().

int ED_area_header_standardbuttons ( const bContext C,
uiBlock block,
int  yco 
)
int ED_area_header_switchbutton ( const bContext C,
uiBlock block,
int  yco 
)
void ED_area_headerprint ( ScrArea sa,
const char *  str 
)
int ED_area_headersize ( void  )
void ED_area_initialize ( wmWindowManager wm,
wmWindow win,
ScrArea sa 
)
void ED_area_newspace ( bContext C,
ScrArea sa,
int  type 
)
void ED_area_overdraw ( bContext C)
void ED_area_overdraw_flush ( ScrArea sa,
ARegion ar 
)
void ED_area_prevspace ( bContext C,
ScrArea sa 
)
void ED_area_swapspace ( bContext C,
ScrArea sa1,
ScrArea sa2 
)
void ED_area_tag_redraw ( ScrArea sa)

Definition at line 536 of file area.c.

References ED_region_tag_redraw(), ListBase::first, ARegion::next, and ScrArea::regionbase.

Referenced by action_listener(), action_refresh(), actkeys_viewall(), area_dupli_invoke(), area_join_modal(), area_move_apply_do(), area_split_apply(), area_split_exit(), area_split_modal(), area_swap_modal(), BIF_sk_selectStroke(), bookmark_add_exec(), bookmark_delete_exec(), borderselect_exec(), buttons_area_listener(), buttons_area_redraw(), clip_listener(), clip_rebuild_proxy_exec(), clip_refresh(), console_clear_exec(), console_delete_exec(), console_history_append_exec(), console_history_cycle_exec(), console_insert_exec(), console_modal_select_apply(), console_move_exec(), console_paste_exec(), console_scrollback_append_exec(), do_buttons_buttons(), do_node_region_buttons(), do_view3d_header_buttons(), do_view3d_region_buttons(), ED_area_newspace(), ED_area_prevspace(), ED_area_swapspace(), ED_region_toggle_hidden(), ED_view3d_quadview_update(), file_draw_check_cb(), file_filenum_exec(), file_highlight_invoke(), file_listener(), file_rename_exec(), file_select_all_exec(), game_engine_exec(), graph_listener(), graphkeys_clear_ghostcurves_exec(), graphkeys_create_ghostcurves_exec(), graphkeys_viewall(), header_flip_exec(), image_listener(), image_record_composite_apply(), image_sample_apply(), image_sample_exit(), image_sample_line_exec(), localview_exec(), nla_listener(), nlaedit_viewall(), node_area_listener(), pin_cb(), previewrange_clear_exec(), redraw_timer_window_swap(), region_flip_exec(), region_quadview_exec(), region_scale_modal(), render_view_show_invoke(), report_delete_exec(), report_replay_exec(), report_select_all_toggle_exec(), sample_apply(), sample_exit(), select_report_pick_exec(), seq_proxy_build_job(), sequencer_refresh(), sequencer_view_all_exec(), sequencer_view_all_preview_exec(), sequencer_view_selected_exec(), set_clone_cursor_exec(), sketch_cancel(), sketch_convert(), sketch_draw_modal(), sketch_draw_preview(), sketch_finish(), sketch_select(), spacefunc(), template_texture_show(), text_listener(), text_scroll_apply(), text_scroll_exec(), text_scroll_modal(), time_listener(), view3d_layers_exec(), viewRedrawForce(), and wm_gesture_end().

void ED_area_tag_redraw_regiontype ( ScrArea sa,
int  regiontype 
)
void ED_area_tag_refresh ( ScrArea sa)
static void ed_default_handlers ( wmWindowManager wm,
ScrArea sa,
ListBase handlers,
int  flag 
) [static]
void ED_region_do_draw ( bContext C,
ARegion ar 
)
void ED_region_do_listen ( ARegion ar,
wmNotifier note 
)
void ED_region_header ( const bContext C,
ARegion ar 
)
void ED_region_header_init ( ARegion ar)
void ED_region_info_draw ( ARegion ar,
const char *  text,
int  block,
float  alpha 
)
void ED_region_init ( bContext C,
ARegion ar 
)
void ED_region_panels ( const bContext C,
ARegion ar,
int  vertical,
const char *  context,
int  contextnr 
)
void ED_region_panels_init ( wmWindowManager wm,
ARegion ar 
)
void ED_region_pixelspace ( ARegion ar)
void ED_region_set ( const bContext C,
ARegion ar 
)
void ED_region_tag_redraw ( ARegion ar)

Definition at line 503 of file area.c.

References ARegion::do_draw, ARegion::drawrct, and RGN_DRAW.

Referenced by action_channel_area_listener(), action_header_area_listener(), action_main_area_listener(), axis_set_view(), backimage_zoom(), button_activate_exit(), button_activate_state(), clip_main_area_listener(), clip_properties_area_listener(), clip_props_area_listener(), console_main_area_listener(), curvemap_buttons_redraw(), curvemap_buttons_zoom_in(), curvemap_buttons_zoom_out(), curvemap_tools_dofunc(), do_item_rename(), do_outliner_operation_event(), ED_area_headerprint(), ED_area_tag_redraw(), ED_area_tag_redraw_regiontype(), ED_region_do_listen(), ED_screen_set_subwinactive(), face_select_all_exec(), face_select_hide_exec(), face_select_inverse_exec(), face_select_reveal_exec(), file_main_area_listener(), file_smoothscroll_invoke(), file_ui_area_listener(), fly_modal(), gpencil_draw_apply_event(), grab_clone_apply(), graph_region_listener(), image_buttons_area_listener(), image_header_area_listener(), image_main_area_listener(), image_scope_area_listener(), image_view_all_exec(), image_view_ndof_invoke(), image_view_pan_exec(), image_view_pan_exit(), image_view_selected_exec(), image_view_zoom_exec(), image_view_zoom_exit(), image_view_zoom_in_exec(), image_view_zoom_invoke(), image_view_zoom_modal(), image_view_zoom_out_exec(), image_view_zoom_ratio_exec(), info_header_listener(), info_main_area_listener(), keymap_type_cb(), logic_listener(), ndof_orbit_invoke(), ndof_pan_invoke(), nla_channel_area_listener(), nla_main_area_listener(), nla_region_listener(), node_link_modal(), node_region_listener(), node_resize_modal(), node_view_all_exec(), outliner_header_area_listener(), outliner_item_activate(), outliner_item_openclose(), outliner_main_area_listener(), outliner_one_level_exec(), outliner_scroll_page_exec(), outliner_show_active_exec(), outliner_show_hierarchy_exec(), outliner_toggle_expanded_exec(), outliner_toggle_renderability_exec(), outliner_toggle_selectability_exec(), outliner_toggle_selected_exec(), outliner_toggle_visibility_exec(), paint_redraw(), paint_select_linked_exec(), paint_select_linked_pick_invoke(), paintface_mouse_select(), panel_activate_state(), radial_control_modal(), redraw_timer_exec(), rename_anim_channels(), renamebutton_cb(), reset_exec(), ringcut_modal(), ringsel_exit(), ringsel_init(), run_pyfile_exec(), screen_animation_step(), scroller_activate_apply(), scroller_activate_exit(), scroller_activate_init(), sculpt_flush_update(), sequencer_buttons_area_listener(), sequencer_main_area_listener(), sequencer_preview_area_listener(), sequencer_view_zoom_ratio_exec(), smooth_view(), snode_bg_viewmove_modal(), time_header_area_listener(), time_main_area_listener(), time_view_all_exec(), ui_do_animate(), ui_do_but_HOTKEYEVT(), ui_do_but_textedit(), ui_do_but_textedit_select(), ui_do_button(), ui_do_drag(), ui_handle_button_event(), ui_handle_list_event(), ui_handle_panel_header(), ui_handler_panel_region(), ui_menu_scroll(), ui_numedit_apply(), ui_popup_block_create(), ui_searchbox_create(), ui_searchbox_select(), ui_searchbox_update(), ui_tooltip_create(), UI_view2d_sync(), uiContextAnimUpdate(), uiEndPanels(), vert_select_all_exec(), vert_select_inverse_exec(), vertex_color_set_exec(), view3d_all_exec(), view3d_boxview_copy(), view3d_boxview_sync(), view3d_buttons_area_listener(), view3d_clipping_invoke(), view3d_header_area_listener(), view3d_main_area_draw_objects(), view3d_main_area_listener(), view3d_props_area_listener(), view_all_exec(), view_borderzoom_exec(), view_pan_apply(), view_pan_exec(), view_pan_exit(), view_selected_exec(), view_zoom_exec(), view_zoom_exit(), view_zoom_in_exec(), view_zoom_invoke(), view_zoom_modal(), view_zoom_out_exec(), view_zoom_ratio_exec(), view_zoomdrag_apply(), view_zoomstep_apply(), viewdolly_apply(), viewdolly_exec(), viewmove_apply(), viewops_data_free(), viewpan_exec(), viewpersportho_exec(), viewrotate_apply(), viewrotate_invoke(), viewzoom_apply(), viewzoom_exec(), vpaint_stroke_update_step(), weight_paint_set_exec(), wm_method_draw_overlap_all(), wm_tag_redraw_overlay(), and wpaint_stroke_update_step().

void ED_region_tag_redraw_overlay ( ARegion ar)

Definition at line 512 of file area.c.

References ARegion::do_draw_overlay, and RGN_DRAW.

Referenced by view3d_main_area_listener().

void ED_region_tag_redraw_partial ( ARegion ar,
rcti rct 
)
void ED_region_toggle_hidden ( bContext C,
ARegion ar 
)
static const char* editortype_pup ( void  ) [static]

Definition at line 1450 of file area.c.

References IFACE_, N_, and types.

Referenced by ED_area_header_switchbutton().

static int rct_fits ( rcti rect,
char  dir,
int  size 
) [static]

Definition at line 892 of file area.c.

References size(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by region_rect_recursive().

static void region_azone_add ( ScrArea sa,
ARegion ar,
int  alignment 
) [static]
static void region_azone_edge ( AZone az,
ARegion ar 
) [static]
static void region_azone_icon ( ScrArea sa,
AZone az,
ARegion ar 
) [static]
static void region_azone_initialize ( ScrArea sa,
ARegion ar,
AZEdge  edge 
) [static]
static void region_azone_tab ( ScrArea sa,
AZone az,
ARegion ar 
) [static]
static void region_azone_tab_plus ( ScrArea sa,
AZone az,
ARegion ar 
) [static]
static void region_azone_tria ( ScrArea sa,
AZone az,
ARegion ar 
) [static]
static void region_draw_azone_icon ( AZone az) [static]

Definition at line 199 of file area.c.

References NULL, sdrawline(), AZone::x1, AZone::x2, AZone::y1, and AZone::y2.

Referenced by ED_area_overdraw().

static void region_draw_azone_tab ( AZone az) [static]
static void region_draw_azone_tab_plus ( AZone az) [static]
static void region_draw_azone_tria ( AZone az) [static]
static void region_draw_emboss ( ARegion ar,
rcti scirct 
) [static]

Definition at line 72 of file area.c.

References sdrawline(), ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by ED_region_do_draw().

static void region_rect_recursive ( ScrArea sa,
ARegion ar,
rcti remainder,
int  quad 
) [static]
void region_scissor_winrct ( ARegion ar,
rcti winrct 
)
static void region_subwindow ( wmWindow win,
ARegion ar 
) [static]
static void spacefunc ( struct bContext C,
void *  UNUSEDarg1,
void *  UNUSEDarg2 
) [static]