Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::widgets::skeletons::text_editor::editor_behavior_interface Class Referenceabstract
Inheritance diagram for nana::widgets::skeletons::text_editor::editor_behavior_interface:
nana::widgets::skeletons::text_editor::behavior_linewrapped nana::widgets::skeletons::text_editor::behavior_normal

Public Types

using row_coordinate = std::pair< std::size_t, std::size_t >
 A coordinate type for line position. first: the absolute line position of text. second: the secondary line position of a part of line. More...
 

Public Member Functions

virtual ~editor_behavior_interface ()=default
 
virtual std::vector< text_sectionline (std::size_t pos) const =0
 Returns the text sections of a specified line. More...
 
virtual row_coordinate text_position_from_screen (int top) const =0
 
virtual unsigned max_pixels () const =0
 
virtual void merge_lines (std::size_t first, std::size_t second)=0
 Deletes lines between first and second, and then, second line will be merged into first line. More...
 
virtual void add_lines (std::size_t pos, std::size_t lines)=0
 
virtual void prepare ()=0
 
virtual void pre_calc_line (std::size_t line, unsigned pixels)=0
 
virtual void pre_calc_lines (unsigned pixels)=0
 
virtual std::size_t take_lines () const =0
 
virtual std::size_t take_lines (std::size_t pos) const =0
 Returns the number of lines that the line of text specified by pos takes. More...
 

Member Typedef Documentation

A coordinate type for line position. first: the absolute line position of text. second: the secondary line position of a part of line.

Constructor & Destructor Documentation

virtual nana::widgets::skeletons::text_editor::editor_behavior_interface::~editor_behavior_interface ( )
virtualdefault

Member Function Documentation

virtual void nana::widgets::skeletons::text_editor::editor_behavior_interface::add_lines ( std::size_t  pos,
std::size_t  lines 
)
pure virtual
virtual std::vector<text_section> nana::widgets::skeletons::text_editor::editor_behavior_interface::line ( std::size_t  pos) const
pure virtual

Returns the text sections of a specified line.

Parameters
posThe absolute line number.
Returns
The text sections of this line.

Implemented in nana::widgets::skeletons::text_editor::behavior_linewrapped, and nana::widgets::skeletons::text_editor::behavior_normal.

virtual unsigned nana::widgets::skeletons::text_editor::editor_behavior_interface::max_pixels ( ) const
pure virtual
virtual void nana::widgets::skeletons::text_editor::editor_behavior_interface::merge_lines ( std::size_t  first,
std::size_t  second 
)
pure virtual

Deletes lines between first and second, and then, second line will be merged into first line.

Implemented in nana::widgets::skeletons::text_editor::behavior_linewrapped, and nana::widgets::skeletons::text_editor::behavior_normal.

virtual void nana::widgets::skeletons::text_editor::editor_behavior_interface::pre_calc_line ( std::size_t  line,
unsigned  pixels 
)
pure virtual
virtual void nana::widgets::skeletons::text_editor::editor_behavior_interface::pre_calc_lines ( unsigned  pixels)
pure virtual
virtual void nana::widgets::skeletons::text_editor::editor_behavior_interface::prepare ( )
pure virtual
virtual std::size_t nana::widgets::skeletons::text_editor::editor_behavior_interface::take_lines ( ) const
pure virtual
virtual std::size_t nana::widgets::skeletons::text_editor::editor_behavior_interface::take_lines ( std::size_t  pos) const
pure virtual

Returns the number of lines that the line of text specified by pos takes.

Implemented in nana::widgets::skeletons::text_editor::behavior_linewrapped, and nana::widgets::skeletons::text_editor::behavior_normal.

virtual row_coordinate nana::widgets::skeletons::text_editor::editor_behavior_interface::text_position_from_screen ( int  top) const
pure virtual