GCC Middle and Back End API Reference
text_art::tree_widget Class Reference

#include <tree-widget.h>

Inheritance diagram for text_art::tree_widget:
Collaboration diagram for text_art::tree_widget:

Public Member Functions

 tree_widget (std::unique_ptr< widget > node, const theme &theme, style::id_t style_id)
static std::unique_ptr< tree_widget > const char * get_desc () const override
canvas::size_t calc_req_size () final override
void update_child_alloc_rects () final override
void paint_to_canvas (canvas &canvas) final override
void add_child (std::unique_ptr< widget > child)
size_t get_num_children () const
canvas to_canvas (const style_manager &style_mgr)
canvas::size_t get_req_size ()
const canvas::size_t get_req_size () const
void set_alloc_rect (const canvas::rect_t &rect)
int get_req_w () const
int get_req_h () const
const canvas::rect_tget_alloc_rect () const
int get_alloc_w () const
int get_alloc_h () const
int get_min_x () const
int get_max_x () const
int get_next_x () const
int get_min_y () const
int get_max_y () const
int get_next_y () const
canvas::range_t get_x_range () const
canvas::range_t get_y_range () const
const canvas::coord_tget_top_left () const

Static Public Member Functions

static std::unique_ptr< tree_widgetmake (styled_string str, const theme &theme, style::id_t style_id)
static std::unique_ptr< tree_widgetmake (const dump_widget_info &dwi, pretty_printer *pp)
static std::unique_ptr< tree_widgetmake (const dump_widget_info &dwi, const char *str)
static std::unique_ptr< tree_widgetfrom_fmt (const dump_widget_info &dwi, printer_fn format_decoder, const char *fmt,...) ATTRIBUTE_GCC_PPDIAG(3

Static Public Attributes

static const bool DEBUG_GEOMETRY = false

Private Attributes

std::unique_ptr< widgetm_node
std::vector< std::unique_ptr< widget > > m_children
const themem_theme
style::id_t m_style_id
canvas::size_t m_req_size
canvas::rect_t m_alloc_rect

Constructor & Destructor Documentation

◆ tree_widget()

text_art::tree_widget::tree_widget ( std::unique_ptr< widget > node,
const theme & theme,
style::id_t style_id )
inline

References m_node, m_style_id, and m_theme.

Member Function Documentation

◆ add_child()

void text_art::tree_widget::add_child ( std::unique_ptr< widget > child)
inline

◆ calc_req_size()

canvas::size_t tree_widget::calc_req_size ( )
finaloverridevirtual

◆ from_fmt()

std::unique_ptr< tree_widget > tree_widget::from_fmt ( const dump_widget_info & dwi,
printer_fn format_decoder,
const char * fmt,
... )
static

◆ get_alloc_h()

int text_art::widget::get_alloc_h ( ) const
inlineinherited

References m_alloc_rect.

◆ get_alloc_rect()

const canvas::rect_t & text_art::widget::get_alloc_rect ( ) const
inlineinherited

◆ get_alloc_w()

int text_art::widget::get_alloc_w ( ) const
inlineinherited

◆ get_desc()

const char * tree_widget::get_desc ( ) const
overridevirtual

Implements text_art::widget.

◆ get_max_x()

int text_art::widget::get_max_x ( ) const
inlineinherited

References m_alloc_rect.

◆ get_max_y()

int text_art::widget::get_max_y ( ) const
inlineinherited

◆ get_min_x()

◆ get_min_y()

int text_art::widget::get_min_y ( ) const
inlineinherited

◆ get_next_x()

int text_art::widget::get_next_x ( ) const
inlineinherited

References m_alloc_rect.

◆ get_next_y()

int text_art::widget::get_next_y ( ) const
inlineinherited

References m_alloc_rect.

◆ get_num_children()

size_t text_art::tree_widget::get_num_children ( ) const
inline

References m_children.

◆ get_req_h()

int text_art::widget::get_req_h ( ) const
inlineinherited

References m_req_size.

◆ get_req_size() [1/2]

canvas::size_t text_art::widget::get_req_size ( )
inlineinherited

References calc_req_size(), DEBUG_GEOMETRY, get_desc(), and m_req_size.

Referenced by to_canvas().

◆ get_req_size() [2/2]

const canvas::size_t text_art::widget::get_req_size ( ) const
inlineinherited

References m_req_size.

◆ get_req_w()

int text_art::widget::get_req_w ( ) const
inlineinherited

References m_req_size.

◆ get_top_left()

const canvas::coord_t & text_art::widget::get_top_left ( ) const
inlineinherited

◆ get_x_range()

canvas::range_t text_art::widget::get_x_range ( ) const
inlineinherited

References m_alloc_rect.

◆ get_y_range()

canvas::range_t text_art::widget::get_y_range ( ) const
inlineinherited

References m_alloc_rect.

◆ make() [1/3]

std::unique_ptr< tree_widget > tree_widget::make ( const dump_widget_info & dwi,
const char * str )
static

◆ make() [2/3]

◆ make() [3/3]

std::unique_ptr< tree_widget > tree_widget::make ( styled_string str,
const theme & theme,
style::id_t style_id )
static

Referenced by from_fmt(), make(), and make().

◆ paint_to_canvas()

◆ set_alloc_rect()

◆ to_canvas()

canvas widget::to_canvas ( const style_manager & style_mgr)
inherited
class text_art::widget.   

References get_req_size(), paint_to_canvas(), and set_alloc_rect().

◆ update_child_alloc_rects()

void tree_widget::update_child_alloc_rects ( )
finaloverridevirtual

Field Documentation

◆ DEBUG_GEOMETRY

const bool text_art::widget::DEBUG_GEOMETRY = false
staticinherited

Referenced by get_req_size(), and set_alloc_rect().

◆ m_alloc_rect

◆ m_children

std::vector<std::unique_ptr<widget> > text_art::tree_widget::m_children
private

◆ m_node

std::unique_ptr<widget> text_art::tree_widget::m_node
private

◆ m_req_size

canvas::size_t text_art::widget::m_req_size
privateinherited

◆ m_style_id

style::id_t text_art::tree_widget::m_style_id
private

Referenced by paint_to_canvas(), and tree_widget().

◆ m_theme

const theme& text_art::tree_widget::m_theme
private

Referenced by paint_to_canvas(), and tree_widget().


The documentation for this class was generated from the following files: