Blender  V3.3
textview.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
10  TVC_LINE_FG = (1 << 0),
11  TVC_LINE_BG = (1 << 1),
12  TVC_LINE_ICON = (1 << 2),
13  TVC_LINE_ICON_FG = (1 << 3),
14  TVC_LINE_ICON_BG = (1 << 4)
15 };
16 
17 typedef struct TextViewContext {
19  int lheight;
22 
24 
29 
32 
33  /* callbacks */
34  int (*begin)(struct TextViewContext *tvc);
35  void (*end)(struct TextViewContext *tvc);
36  const void *arg1;
37  const void *arg2;
38 
39  /* iterator */
40  int (*step)(struct TextViewContext *tvc);
41  void (*line_get)(struct TextViewContext *tvc, const char **r_line, int *r_len);
43  uchar fg[4],
44  uchar bg[4],
45  int *r_icon,
46  uchar r_icon_fg[4],
47  uchar r_icon_bg[4]);
48  void (*draw_cursor)(struct TextViewContext *tvc, int cwidth, int columns);
49  /* constant theme colors */
50  void (*const_colors)(struct TextViewContext *tvc, unsigned char bg_sel[4]);
51  const void *iter;
58  int iter_tmp;
59 
61 
69 int textview_draw(struct TextViewContext *tvc,
70  bool do_draw,
71  const int mval_init[2],
72  void **r_mval_pick_item,
73  int *r_mval_pick_offset);
unsigned char uchar
Definition: BLI_sys_types.h:70
SyclQueue void void size_t num_bytes void
const void * arg2
Definition: textview.h:37
rcti draw_rect
Definition: textview.h:26
const void * arg1
Definition: textview.h:36
void(* line_get)(struct TextViewContext *tvc, const char **r_line, int *r_len)
Definition: textview.h:41
const void * iter
Definition: textview.h:51
int iter_char_end
Definition: textview.h:56
int row_vpadding
Definition: textview.h:23
int iter_char_begin
Definition: textview.h:54
int(* begin)(struct TextViewContext *tvc)
Definition: textview.h:34
void(* const_colors)(struct TextViewContext *tvc, unsigned char bg_sel[4])
Definition: textview.h:50
enum eTextViewContext_LineFlag(* line_data)(struct TextViewContext *tvc, uchar fg[4], uchar bg[4], int *r_icon, uchar r_icon_fg[4], uchar r_icon_bg[4])
Definition: textview.h:42
void(* end)(struct TextViewContext *tvc)
Definition: textview.h:35
int(* step)(struct TextViewContext *tvc)
Definition: textview.h:40
void(* draw_cursor)(struct TextViewContext *tvc, int cwidth, int columns)
Definition: textview.h:48
rcti draw_rect_outer
Definition: textview.h:28
int textview_draw(struct TextViewContext *tvc, bool do_draw, const int mval_init[2], void **r_mval_pick_item, int *r_mval_pick_offset)
Definition: textview.c:293
eTextViewContext_LineFlag
Definition: textview.h:9
@ TVC_LINE_ICON
Definition: textview.h:12
@ TVC_LINE_ICON_FG
Definition: textview.h:13
@ TVC_LINE_ICON_BG
Definition: textview.h:14
@ TVC_LINE_BG
Definition: textview.h:11
@ TVC_LINE_FG
Definition: textview.h:10
struct TextViewContext TextViewContext