Blender V2.61 - r43446
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <limits.h>
#include "BLF_api.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_space_types.h"
#include "DNA_screen_types.h"
#include "BKE_report.h"
#include "MEM_guardedalloc.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_datafiles.h"
#include "ED_types.h"
#include "UI_resources.h"
#include "console_intern.h"
#include "../space_info/textview.h"
Go to the source code of this file.
Classes | |
struct | ConsoleDrawContext |
Defines | |
#define | CONSOLE_DRAW_MARGIN 4 |
#define | CONSOLE_DRAW_SCROLL 16 |
Typedefs | |
typedef struct ConsoleDrawContext | ConsoleDrawContext |
Functions | |
static void | console_line_color (unsigned char fg[3], int type) |
void | console_scrollback_prompt_begin (struct SpaceConsole *sc, ConsoleLine *cl_dummy) |
void | console_scrollback_prompt_end (struct SpaceConsole *sc, ConsoleLine *cl_dummy) |
static int | console_textview_begin (TextViewContext *tvc) |
static void | console_textview_end (TextViewContext *tvc) |
static int | console_textview_step (TextViewContext *tvc) |
static int | console_textview_line_get (struct TextViewContext *tvc, const char **line, int *len) |
static int | console_textview_line_color (struct TextViewContext *tvc, unsigned char fg[3], unsigned char UNUSED(bg[3])) |
static int | console_textview_main__internal (struct SpaceConsole *sc, struct ARegion *ar, int draw, int mval[2], void **mouse_pick, int *pos_pick) |
void | console_textview_main (struct SpaceConsole *sc, struct ARegion *ar) |
int | console_textview_height (struct SpaceConsole *sc, struct ARegion *ar) |
int | console_char_pick (struct SpaceConsole *sc, struct ARegion *ar, int mval[2]) |
Definition in file console_draw.c.
#define CONSOLE_DRAW_MARGIN 4 |
Definition at line 111 of file console_draw.c.
Referenced by console_char_pick(), and console_textview_line_color().
#define CONSOLE_DRAW_SCROLL 16 |
Definition at line 112 of file console_draw.c.
Referenced by console_char_pick().
typedef struct ConsoleDrawContext ConsoleDrawContext |
int console_char_pick | ( | struct SpaceConsole * | sc, |
struct ARegion * | ar, | ||
int | mval[2] | ||
) |
Definition at line 241 of file console_draw.c.
References CLAMPIS, CONSOLE_DRAW_MARGIN, CONSOLE_DRAW_SCROLL, console_textview_main__internal(), NULL, ARegion::winx, and ARegion::winy.
Referenced by console_cursor_set_to_pos().
static void console_line_color | ( | unsigned char | fg[3], |
int | type | ||
) | [static] |
Definition at line 60 of file console_draw.c.
References CONSOLE_LINE_ERROR, CONSOLE_LINE_INFO, CONSOLE_LINE_INPUT, CONSOLE_LINE_OUTPUT, TH_CONSOLE_ERROR, TH_CONSOLE_INFO, TH_CONSOLE_INPUT, TH_CONSOLE_OUTPUT, and UI_GetThemeColor3ubv().
Referenced by console_textview_line_color().
void console_scrollback_prompt_begin | ( | struct SpaceConsole * | sc, |
ConsoleLine * | cl_dummy | ||
) |
Definition at line 93 of file console_draw.c.
References BLI_addtail(), CONSOLE_LINE_INPUT, SpaceConsole::history, ListBase::last, ConsoleLine::len, ConsoleLine::len_alloc, ConsoleLine::line, MEM_mallocN(), SpaceConsole::prompt, SpaceConsole::scrollback, strlen(), and ConsoleLine::type.
Referenced by console_copy_exec(), and console_textview_main__internal().
void console_scrollback_prompt_end | ( | struct SpaceConsole * | sc, |
ConsoleLine * | cl_dummy | ||
) |
Definition at line 105 of file console_draw.c.
References BLI_remlink(), ConsoleLine::line, MEM_freeN(), and SpaceConsole::scrollback.
Referenced by console_copy_exec(), and console_textview_main__internal().
static int console_textview_begin | ( | TextViewContext * | tvc | ) | [static] |
Definition at line 117 of file console_draw.c.
References TextViewContext::arg1, TextViewContext::iter, ListBase::last, TextViewContext::lheight, SpaceConsole::lheight, NULL, SpaceConsole::scrollback, TextViewContext::sel_end, SpaceConsole::sel_end, SpaceConsole::sel_start, and TextViewContext::sel_start.
Referenced by console_textview_main__internal().
static void console_textview_end | ( | TextViewContext * | tvc | ) | [static] |
Definition at line 130 of file console_draw.c.
References TextViewContext::arg1.
Referenced by console_textview_main__internal().
int console_textview_height | ( | struct SpaceConsole * | sc, |
struct ARegion * | ar | ||
) |
Definition at line 235 of file console_draw.c.
References console_textview_main__internal(), and NULL.
Referenced by console_textview_update_rect().
static int console_textview_line_color | ( | struct TextViewContext * | tvc, |
unsigned char | fg[3], | ||
unsigned char | UNUSEDbg[3] | ||
) | [static] |
Definition at line 151 of file console_draw.c.
References TextViewContext::arg1, CONSOLE_DRAW_MARGIN, console_line_color(), TextViewContext::console_width, TextViewContext::cwidth, SpaceConsole::history, TextViewContext::iter, TextViewContext::iter_index, ListBase::last, TextViewContext::lheight, SpaceConsole::prompt, strlen(), TH_CONSOLE_CURSOR, TVC_LINE_FG, ConsoleLine::type, and UI_GetThemeColor3ubv().
Referenced by console_textview_main__internal().
static int console_textview_line_get | ( | struct TextViewContext * | tvc, |
const char ** | line, | ||
int * | len | ||
) | [static] |
Definition at line 142 of file console_draw.c.
References TextViewContext::iter, ConsoleLine::len, and ConsoleLine::line.
Referenced by console_textview_main__internal().
void console_textview_main | ( | struct SpaceConsole * | sc, |
struct ARegion * | ar | ||
) |
Definition at line 229 of file console_draw.c.
References console_textview_main__internal(), and NULL.
Referenced by console_main_area_draw().
static int console_textview_main__internal | ( | struct SpaceConsole * | sc, |
struct ARegion * | ar, | ||
int | draw, | ||
int | mval[2], | ||
void ** | mouse_pick, | ||
int * | pos_pick | ||
) | [static] |
Definition at line 194 of file console_draw.c.
References TextViewContext::arg1, TextViewContext::arg2, TextViewContext::begin, console_scrollback_prompt_begin(), console_scrollback_prompt_end(), console_textview_begin(), console_textview_end(), console_textview_line_color(), console_textview_line_get(), console_textview_step(), View2D::cur, TextViewContext::end, TextViewContext::lheight, SpaceConsole::lheight, TextViewContext::line_color, TextViewContext::line_get, NULL, TextViewContext::sel_end, SpaceConsole::sel_end, SpaceConsole::sel_start, TextViewContext::sel_start, TextViewContext::step, textview_draw(), ARegion::v2d, TextViewContext::winx, ARegion::winx, TextViewContext::ymax, rctf::ymax, rctf::ymin, and TextViewContext::ymin.
Referenced by console_char_pick(), console_textview_height(), and console_textview_main().
static int console_textview_step | ( | TextViewContext * | tvc | ) | [static] |
Definition at line 137 of file console_draw.c.
References TextViewContext::iter, and NULL.
Referenced by console_textview_main__internal().