Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

console_ops.c File Reference

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_text.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "console_intern.h"

Go to the source code of this file.

Classes

struct  SetConsoleCursor

Defines

#define TAB_LENGTH   4

Typedefs

typedef struct SetConsoleCursor SetConsoleCursor

Functions

static void console_scroll_bottom (ARegion *ar)
static void console_textview_update_rect (SpaceConsole *sc, ARegion *ar)
static void console_select_offset (SpaceConsole *sc, const int offset)
void console_history_free (SpaceConsole *sc, ConsoleLine *cl)
void console_scrollback_free (SpaceConsole *sc, ConsoleLine *cl)
static void console_scrollback_limit (SpaceConsole *sc)
static ConsoleLineconsole_history_find (SpaceConsole *sc, const char *str, ConsoleLine *cl_ignore)
static int console_line_cursor_set (ConsoleLine *cl, int cursor)
static char cursor_char (ConsoleLine *cl)
static char cursor_char_prev (ConsoleLine *cl)
static ConsoleLineconsole_lb_add__internal (ListBase *lb, ConsoleLine *from)
static ConsoleLineconsole_history_add (const bContext *C, ConsoleLine *from)
static ConsoleLineconsole_lb_add_str__internal (ListBase *lb, char *str, int own)
ConsoleLineconsole_history_add_str (SpaceConsole *sc, char *str, int own)
ConsoleLineconsole_scrollback_add_str (SpaceConsole *sc, char *str, int own)
ConsoleLineconsole_history_verify (const bContext *C)
static void console_line_verify_length (ConsoleLine *ci, int len)
static int console_line_insert (ConsoleLine *ci, char *str)
static int console_move_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_move (wmOperatorType *ot)
static int console_insert_exec (bContext *C, wmOperator *op)
static int console_insert_invoke (bContext *C, wmOperator *op, wmEvent *event)
void CONSOLE_OT_insert (wmOperatorType *ot)
static int console_delete_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_delete (wmOperatorType *ot)
static int console_clear_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_clear (wmOperatorType *ot)
static int console_history_cycle_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_history_cycle (wmOperatorType *ot)
static int console_history_append_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_history_append (wmOperatorType *ot)
static int console_scrollback_append_exec (bContext *C, wmOperator *op)
void CONSOLE_OT_scrollback_append (wmOperatorType *ot)
static int console_copy_exec (bContext *C, wmOperator *UNUSED(op))
void CONSOLE_OT_copy (wmOperatorType *ot)
static int console_paste_exec (bContext *C, wmOperator *UNUSED(op))
void CONSOLE_OT_paste (wmOperatorType *ot)
static void console_cursor_set_to_pos (SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel))
static void console_modal_select_apply (bContext *C, wmOperator *op, wmEvent *event)
static void console_cursor_set_exit (bContext *UNUSED(C), wmOperator *op)
static int console_modal_select_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int console_modal_select (bContext *C, wmOperator *op, wmEvent *event)
static int console_modal_select_cancel (bContext *C, wmOperator *op)
void CONSOLE_OT_select_set (wmOperatorType *ot)

Variables

static EnumPropertyItem console_move_type_items []
static EnumPropertyItem console_delete_type_items []

Detailed Description

Definition in file console_ops.c.


Define Documentation

#define TAB_LENGTH   4

Definition at line 374 of file console_ops.c.

Referenced by console_insert_exec().


Typedef Documentation


Function Documentation

static int console_clear_exec ( bContext C,
wmOperator op 
) [static]
static int console_copy_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void console_cursor_set_exit ( bContext UNUSEDC,
wmOperator op 
) [static]

Definition at line 923 of file console_ops.c.

References wmOperator::customdata, and MEM_freeN().

Referenced by console_modal_select(), and console_modal_select_cancel().

static void console_cursor_set_to_pos ( SpaceConsole sc,
ARegion ar,
SetConsoleCursor scu,
int  mval[2],
int   UNUSEDsel 
) [static]
static int console_delete_exec ( bContext C,
wmOperator op 
) [static]
static ConsoleLine* console_history_add ( const bContext C,
ConsoleLine from 
) [static]
ConsoleLine* console_history_add_str ( SpaceConsole sc,
char *  str,
int  own 
)
static int console_history_append_exec ( bContext C,
wmOperator op 
) [static]
static int console_history_cycle_exec ( bContext C,
wmOperator op 
) [static]
static ConsoleLine* console_history_find ( SpaceConsole sc,
const char *  str,
ConsoleLine cl_ignore 
) [static]
void console_history_free ( SpaceConsole sc,
ConsoleLine cl 
)
ConsoleLine* console_history_verify ( const bContext C)
static int console_insert_exec ( bContext C,
wmOperator op 
) [static]
static int console_insert_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static ConsoleLine* console_lb_add__internal ( ListBase lb,
ConsoleLine from 
) [static]
static ConsoleLine* console_lb_add_str__internal ( ListBase lb,
char *  str,
int  own 
) [static]
static int console_line_cursor_set ( ConsoleLine cl,
int  cursor 
) [static]

Definition at line 115 of file console_ops.c.

References ConsoleLine::cursor, and ConsoleLine::len.

Referenced by console_history_append_exec(), and console_move_exec().

static int console_line_insert ( ConsoleLine ci,
char *  str 
) [static]
static void console_line_verify_length ( ConsoleLine ci,
int  len 
) [static]
static int console_modal_select ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static void console_modal_select_apply ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int console_modal_select_cancel ( bContext C,
wmOperator op 
) [static]

Definition at line 975 of file console_ops.c.

References console_cursor_set_exit(), and OPERATOR_FINISHED.

Referenced by CONSOLE_OT_select_set().

static int console_modal_select_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int console_move_exec ( bContext C,
wmOperator op 
) [static]
void CONSOLE_OT_clear ( wmOperatorType ot)
void CONSOLE_OT_copy ( wmOperatorType ot)
void CONSOLE_OT_delete ( wmOperatorType ot)
void CONSOLE_OT_history_append ( wmOperatorType ot)
void CONSOLE_OT_history_cycle ( wmOperatorType ot)
void CONSOLE_OT_insert ( wmOperatorType ot)
void CONSOLE_OT_move ( wmOperatorType ot)
void CONSOLE_OT_paste ( wmOperatorType ot)
void CONSOLE_OT_scrollback_append ( wmOperatorType ot)
void CONSOLE_OT_select_set ( wmOperatorType ot)
static int console_paste_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static void console_scroll_bottom ( ARegion ar) [static]
ConsoleLine* console_scrollback_add_str ( SpaceConsole sc,
char *  str,
int  own 
)
static int console_scrollback_append_exec ( bContext C,
wmOperator op 
) [static]
void console_scrollback_free ( SpaceConsole sc,
ConsoleLine cl 
)
static void console_scrollback_limit ( SpaceConsole sc) [static]
static void console_select_offset ( SpaceConsole sc,
const int  offset 
) [static]
static void console_textview_update_rect ( SpaceConsole sc,
ARegion ar 
) [static]
static char cursor_char ( ConsoleLine cl) [static]

Definition at line 130 of file console_ops.c.

References ConsoleLine::cursor, and ConsoleLine::line.

Referenced by console_move_exec().

static char cursor_char_prev ( ConsoleLine cl) [static]

Definition at line 136 of file console_ops.c.

References ConsoleLine::cursor, and ConsoleLine::line.

Referenced by console_move_exec().


Variable Documentation

Initial value:
 {
    {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
    {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},


    {0, NULL, 0, NULL, NULL}}

Definition at line 447 of file console_ops.c.

Initial value:
 {
    {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
    {LINE_END, "LINE_END", 0, "Line End", ""},
    {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
    {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
    {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
    {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 285 of file console_ops.c.