Blender  V3.3
Classes | Typedefs | Enumerations | Functions
textview.h File Reference

Go to the source code of this file.

Classes

struct  TextViewContext
 

Typedefs

typedef struct TextViewContext TextViewContext
 

Enumerations

enum  eTextViewContext_LineFlag {
  TVC_LINE_FG = (1 << 0) , TVC_LINE_BG = (1 << 1) , TVC_LINE_ICON = (1 << 2) , TVC_LINE_ICON_FG = (1 << 3) ,
  TVC_LINE_ICON_BG = (1 << 4)
}
 

Functions

int textview_draw (struct TextViewContext *tvc, bool do_draw, const int mval_init[2], void **r_mval_pick_item, int *r_mval_pick_offset)
 

Typedef Documentation

◆ TextViewContext

Enumeration Type Documentation

◆ eTextViewContext_LineFlag

Enumerator
TVC_LINE_FG 
TVC_LINE_BG 
TVC_LINE_ICON 
TVC_LINE_ICON_FG 
TVC_LINE_ICON_BG 

Definition at line 9 of file textview.h.

Function Documentation

◆ textview_draw()

int textview_draw ( struct TextViewContext tvc,
bool  do_draw,
const int  mval_init[2],
void **  r_mval_pick_item,
int *  r_mval_pick_offset 
)
Parameters
r_mval_pick_itemThe resulting item clicked on using mval_init. Set from the void pointer which holds the current iterator. Its type depends on the data being iterated over.
r_mval_pick_offsetThe offset in bytes of the mval_init. Use for selection.

Definition at line 293 of file textview.c.

References TextViewContext::begin, BLF_descender(), BLF_fixed_width(), blf_mono_font, BLI_assert, CLAMPIS, TextViewDrawState::columns, TextViewContext::const_colors, TextViewDrawState::cwidth, TextViewDrawState::do_draw, TextViewContext::draw_cursor, TextViewDrawState::draw_rect, TextViewContext::draw_rect, TextViewDrawState::draw_rect_outer, TextViewContext::draw_rect_outer, TextViewContext::end, TextViewDrawState::font_id, if(), TextViewContext::iter, TextViewDrawState::lheight, TextViewContext::lheight, TextViewContext::line_data, TextViewContext::line_get, TextViewDrawState::lofs, TextViewDrawState::mval, TextViewDrawState::mval_pick_offset, NULL, TextViewDrawState::row_vpadding, TextViewContext::row_vpadding, TextViewDrawState::scroll_ymax, TextViewContext::scroll_ymax, TextViewDrawState::scroll_ymin, TextViewContext::scroll_ymin, TextViewDrawState::sel, TextViewContext::sel_end, TextViewContext::sel_start, TextViewContext::step, textview_draw_string(), textview_font_begin(), TVC_LINE_BG, TVC_LINE_FG, TVC_LINE_ICON, TVC_LINE_ICON_BG, TVC_LINE_ICON_FG, rcti::xmax, rcti::xmin, TextViewDrawState::xy, xy, rcti::ymax, and rcti::ymin.

Referenced by console_textview_main__internal(), and info_textview_main__internal().