Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <sys/stat.h>
#include <limits.h>
#include <assert.h>
#include "BLF_api.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_datafiles.h"
#include "textview.h"
Go to the source code of this file.
Classes | |
struct | ConsoleDrawContext |
Defines | |
#define | STEP_SEL(value) cdc->sel[0] += (value); cdc->sel[1] += (value) |
#define | CONSOLE_DRAW_MARGIN 4 |
#define | CONSOLE_DRAW_SCROLL 16 |
Typedefs | |
typedef struct ConsoleDrawContext | ConsoleDrawContext |
Functions | |
static void | console_font_begin (TextViewContext *sc) |
static void | console_draw_sel (int sel[2], int xy[2], int str_len_draw, int cwidth, int lheight) |
static int | console_draw_string (ConsoleDrawContext *cdc, const char *str, int str_len, unsigned char *fg, unsigned char *bg) |
int | textview_draw (TextViewContext *tvc, int draw, int mval[2], void **mouse_pick, int *pos_pick) |
Definition in file textview.c.
#define CONSOLE_DRAW_MARGIN 4 |
Definition at line 218 of file textview.c.
Referenced by textview_draw().
#define CONSOLE_DRAW_SCROLL 16 |
Definition at line 219 of file textview.c.
Referenced by textview_draw().
#define STEP_SEL | ( | value | ) | cdc->sel[0] += (value); cdc->sel[1] += (value) |
Referenced by console_draw_string().
typedef struct ConsoleDrawContext ConsoleDrawContext |
static void console_draw_sel | ( | int | sel[2], |
int | xy[2], | ||
int | str_len_draw, | ||
int | cwidth, | ||
int | lheight | ||
) | [static] |
Definition at line 66 of file textview.c.
References MAX2, MIN2, and stipple_halftone.
Referenced by console_draw_string().
static int console_draw_string | ( | ConsoleDrawContext * | cdc, |
const char * | str, | ||
int | str_len, | ||
unsigned char * | fg, | ||
unsigned char * | bg | ||
) | [static] |
Definition at line 89 of file textview.c.
References BLF_draw(), blf_mono_font, BLF_position(), CLAMP(), console_draw_sel(), ConsoleDrawContext::console_width, copy_v2_v2_int(), ConsoleDrawContext::cwidth, ConsoleDrawContext::draw, ConsoleDrawContext::lheight, mono, ConsoleDrawContext::mval, ConsoleDrawContext::pos_pick, ConsoleDrawContext::sel, STEP_SEL, str, ConsoleDrawContext::winx, ConsoleDrawContext::xy, ConsoleDrawContext::ymax, and ConsoleDrawContext::ymin.
Referenced by textview_draw().
static void console_font_begin | ( | TextViewContext * | sc | ) | [static] |
Definition at line 48 of file textview.c.
References blf_mono_font, BLF_size(), and TextViewContext::lheight.
Referenced by textview_draw().
int textview_draw | ( | TextViewContext * | tvc, |
int | draw, | ||
int | mval[2], | ||
void ** | mouse_pick, | ||
int * | pos_pick | ||
) |
Definition at line 221 of file textview.c.
References assert, TextViewContext::begin, BLF_fixed_width(), blf_mono_font, CLAMP(), CONSOLE_DRAW_MARGIN, CONSOLE_DRAW_SCROLL, console_draw_string(), console_font_begin(), TextViewContext::console_width, ConsoleDrawContext::console_width, TextViewContext::cwidth, ConsoleDrawContext::cwidth, addon::engine::draw(), ConsoleDrawContext::draw, TextViewContext::end, TextViewContext::iter, TextViewContext::iter_index, ConsoleDrawContext::lheight, TextViewContext::lheight, TextViewContext::line_color, TextViewContext::line_get, mono, ConsoleDrawContext::mval, NULL, ConsoleDrawContext::pos_pick, ConsoleDrawContext::sel, TextViewContext::sel_end, TextViewContext::sel_start, TextViewContext::step, TVC_LINE_BG, TVC_LINE_FG, ConsoleDrawContext::winx, TextViewContext::winx, ConsoleDrawContext::xy, TextViewContext::ymax, ConsoleDrawContext::ymax, ConsoleDrawContext::ymin, and TextViewContext::ymin.
Referenced by console_textview_main__internal(), and info_textview_main__internal().