Blender V2.61 - r43446
Defines | Functions

screen_edit.c File Reference

#include <string.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_screen.h"
#include "BKE_scene.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_image.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_screen_types.h"
#include "ED_fileselect.h"
#include "ED_clip.h"
#include "ED_render.h"
#include "UI_interface.h"
#include "wm_subwindow.h"
#include "screen_intern.h"

Go to the source code of this file.

Defines

#define SCR_BACK   0.55
#define SCR_ROUND   12

Functions

static ScrVertscreen_addvert (bScreen *sc, short x, short y)
static void sortscrvert (ScrVert **v1, ScrVert **v2)
static ScrEdgescreen_addedge (bScreen *sc, ScrVert *v1, ScrVert *v2)
ScrEdgescreen_findedge (bScreen *sc, ScrVert *v1, ScrVert *v2)
void removedouble_scrverts (bScreen *sc)
void removenotused_scrverts (bScreen *sc)
void removedouble_scredges (bScreen *sc)
void removenotused_scredges (bScreen *sc)
int scredge_is_horizontal (ScrEdge *se)
ScrEdgescreen_find_active_scredge (bScreen *sc, int mx, int my)
static ScrAreascreen_addarea (bScreen *sc, ScrVert *v1, ScrVert *v2, ScrVert *v3, ScrVert *v4, short headertype, short spacetype)
static void screen_delarea (bContext *C, bScreen *sc, ScrArea *sa)
static short testsplitpoint (ScrArea *sa, char dir, float fac)
ScrAreaarea_split (bScreen *sc, ScrArea *sa, char dir, float fac, int merge)
bScreenED_screen_add (wmWindow *win, Scene *scene, const char *name)
static void screen_copy (bScreen *to, bScreen *from)
int area_getorientation (ScrArea *sa, ScrArea *sb)
int screen_area_join (bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
void select_connected_scredge (bScreen *sc, ScrEdge *edge)
static void screen_test_scale (bScreen *sc, int winsizex, int winsizey)
static void draw_horizontal_join_shape (ScrArea *sa, char dir)
static void draw_vertical_join_shape (ScrArea *sa, char dir)
static void draw_join_shape (ScrArea *sa, char dir)
static void scrarea_draw_shape_dark (ScrArea *sa, char dir)
static void scrarea_draw_shape_light (ScrArea *sa, char UNUSED(dir))
static void drawscredge_area_draw (int sizex, int sizey, short x1, short y1, short x2, short y2, short a)
static void drawscredge_area (ScrArea *sa, int sizex, int sizey, int center)
bScreenED_screen_duplicate (wmWindow *win, bScreen *sc)
static void region_cursor_set (wmWindow *win, int swinid)
void ED_screen_do_listen (bContext *C, wmNotifier *note)
void ED_screen_draw (wmWindow *win)
static void screen_refresh_headersizes (void)
void ED_screen_refresh (wmWindowManager *wm, wmWindow *win)
void ED_screens_initialize (wmWindowManager *wm)
void ED_region_exit (bContext *C, ARegion *ar)
void ED_area_exit (bContext *C, ScrArea *sa)
void ED_screen_exit (bContext *C, wmWindow *window, bScreen *screen)
static void screen_cursor_set (wmWindow *win, wmEvent *event)
void ED_screen_set_subwinactive (bContext *C, wmEvent *event)
int ED_screen_area_active (const bContext *C)
void ED_screen_set (bContext *C, bScreen *sc)
static int ed_screen_used (wmWindowManager *wm, bScreen *sc)
void ED_screen_delete (bContext *C, bScreen *sc)
void ED_screen_set_scene (bContext *C, Scene *scene)
void ED_screen_delete_scene (bContext *C, Scene *scene)
ScrAreaED_screen_full_newspace (bContext *C, ScrArea *sa, int type)
void ED_screen_full_prevspace (bContext *C, ScrArea *sa)
void ED_screen_full_restore (bContext *C, ScrArea *sa)
ScrAreaED_screen_full_toggle (bContext *C, wmWindow *win, ScrArea *sa)
void ED_refresh_viewport_fps (bContext *C)
void ED_screen_animation_timer (bContext *C, int redraws, int refresh, int sync, int enable)
static ARegiontime_top_left_3dwindow (bScreen *screen)
void ED_screen_animation_timer_update (bScreen *screen, int redraws, int refresh)
void ED_update_for_newframe (Main *bmain, Scene *scene, bScreen *screen, int UNUSED(mute))

Detailed Description

Definition in file screen_edit.c.


Define Documentation

#define SCR_BACK   0.55

Definition at line 704 of file screen_edit.c.

#define SCR_ROUND   12

Definition at line 705 of file screen_edit.c.


Function Documentation

int area_getorientation ( ScrArea sa,
ScrArea sb 
)

Definition at line 494 of file screen_edit.c.

References NULL, ScrArea::v1, ScrArea::v2, ScrArea::v3, and ScrArea::v4.

Referenced by area_join_modal(), ED_screen_draw(), and screen_area_join().

ScrArea* area_split ( bScreen sc,
ScrArea sa,
char  dir,
float  fac,
int  merge 
)
static void draw_horizontal_join_shape ( ScrArea sa,
char  dir 
) [static]
static void draw_join_shape ( ScrArea sa,
char  dir 
) [static]

Definition at line 853 of file screen_edit.c.

References draw_horizontal_join_shape(), and draw_vertical_join_shape().

Referenced by scrarea_draw_shape_dark().

static void draw_vertical_join_shape ( ScrArea sa,
char  dir 
) [static]
static void drawscredge_area ( ScrArea sa,
int  sizex,
int  sizey,
int  center 
) [static]

screen edges drawing

Definition at line 904 of file screen_edit.c.

References cpack, drawscredge_area_draw(), ScrArea::v1, ScrArea::v3, ScrVert::vec, vec2s::x, and vec2s::y.

Referenced by ED_screen_draw().

static void drawscredge_area_draw ( int  sizex,
int  sizey,
short  x1,
short  y1,
short  x2,
short  y2,
short  a 
) [static]

Definition at line 883 of file screen_edit.c.

References sdrawline().

Referenced by drawscredge_area().

void ED_area_exit ( bContext C,
ScrArea sa 
)
void ED_refresh_viewport_fps ( bContext C)
void ED_region_exit ( bContext C,
ARegion ar 
)
bScreen* ED_screen_add ( wmWindow win,
Scene scene,
const char *  name 
)
void ED_screen_animation_timer ( bContext C,
int  redraws,
int  refresh,
int  sync,
int  enable 
)
void ED_screen_animation_timer_update ( bScreen screen,
int  redraws,
int  refresh 
)
int ED_screen_area_active ( const bContext C)
void ED_screen_delete ( bContext C,
bScreen sc 
)
void ED_screen_delete_scene ( bContext C,
Scene scene 
)

Definition at line 1500 of file screen_edit.c.

References CTX_data_main(), ED_screen_set_scene(), Scene::id, ID::next, ID::prev, and unlink_scene().

Referenced by scene_delete_exec().

void ED_screen_do_listen ( bContext C,
wmNotifier note 
)
void ED_screen_draw ( wmWindow win)
bScreen* ED_screen_duplicate ( wmWindow win,
bScreen sc 
)
void ED_screen_exit ( bContext C,
wmWindow window,
bScreen screen 
)
ScrArea* ED_screen_full_newspace ( bContext C,
ScrArea sa,
int  type 
)
void ED_screen_full_prevspace ( bContext C,
ScrArea sa 
)
void ED_screen_full_restore ( bContext C,
ScrArea sa 
)
ScrArea* ED_screen_full_toggle ( bContext C,
wmWindow win,
ScrArea sa 
) [read]
void ED_screen_refresh ( wmWindowManager wm,
wmWindow win 
)
void ED_screen_set ( bContext C,
bScreen sc 
)
void ED_screen_set_scene ( bContext C,
Scene scene 
)
void ED_screen_set_subwinactive ( bContext C,
wmEvent event 
)
static int ed_screen_used ( wmWindowManager wm,
bScreen sc 
) [static]

Definition at line 1377 of file screen_edit.c.

References ListBase::first, wmWindow::next, wmWindow::screen, and wmWindowManager::windows.

Referenced by ED_screen_delete().

void ED_screens_initialize ( wmWindowManager wm)
void ED_update_for_newframe ( Main bmain,
Scene scene,
bScreen screen,
int   UNUSEDmute 
)
static void region_cursor_set ( wmWindow win,
int  swinid 
) [static]
void removedouble_scredges ( bScreen sc)
void removedouble_scrverts ( bScreen sc)
void removenotused_scredges ( bScreen sc)
void removenotused_scrverts ( bScreen sc)
static void scrarea_draw_shape_dark ( ScrArea sa,
char  dir 
) [static]

Definition at line 862 of file screen_edit.c.

References draw_join_shape().

Referenced by ED_screen_draw().

static void scrarea_draw_shape_light ( ScrArea sa,
char   UNUSEDdir 
) [static]

Definition at line 872 of file screen_edit.c.

References ScrArea::v1, ScrArea::v3, ScrVert::vec, vec2s::x, and vec2s::y.

Referenced by ED_screen_draw().

int scredge_is_horizontal ( ScrEdge se)
static ScrArea* screen_addarea ( bScreen sc,
ScrVert v1,
ScrVert v2,
ScrVert v3,
ScrVert v4,
short  headertype,
short  spacetype 
) [static]
static ScrEdge* screen_addedge ( bScreen sc,
ScrVert v1,
ScrVert v2 
) [static]
static ScrVert* screen_addvert ( bScreen sc,
short  x,
short  y 
) [static]

Definition at line 74 of file screen_edit.c.

References BLI_addtail(), MEM_callocN(), ScrVert::vec, bScreen::vertbase, vec2s::x, and vec2s::y.

Referenced by area_split(), and ED_screen_add().

int screen_area_join ( bContext C,
bScreen scr,
ScrArea sa1,
ScrArea sa2 
)
static void screen_copy ( bScreen to,
bScreen from 
) [static]
static void screen_cursor_set ( wmWindow win,
wmEvent event 
) [static]
static void screen_delarea ( bContext C,
bScreen sc,
ScrArea sa 
) [static]
ScrEdge* screen_find_active_scredge ( bScreen sc,
int  mx,
int  my 
)
ScrEdge* screen_findedge ( bScreen sc,
ScrVert v1,
ScrVert v2 
)
static void screen_refresh_headersizes ( void  ) [static]
static void screen_test_scale ( bScreen sc,
int  winsizex,
int  winsizey 
) [static]
void select_connected_scredge ( bScreen sc,
ScrEdge edge 
)
static void sortscrvert ( ScrVert **  v1,
ScrVert **  v2 
) [static]

Definition at line 84 of file screen_edit.c.

References ScrArea::v1, and ScrArea::v2.

Referenced by removedouble_scrverts(), screen_addedge(), screen_copy(), and screen_findedge().

static short testsplitpoint ( ScrArea sa,
char  dir,
float  fac 
) [static]

Definition at line 318 of file screen_edit.c.

References AREAGRID, AREAMINX, AREAMINY, CLAMP(), ScrArea::v1, ScrArea::v2, ScrArea::v4, ScrVert::vec, vec2s::x, and vec2s::y.

Referenced by area_split().

static ARegion* time_top_left_3dwindow ( bScreen screen) [static]