wex  v21.04.0
Public Types | Public Member Functions | List of all members
wex::core::stc Class Referenceabstract

Offers a styled text ctrl. More...

#include <wex/stc-core.h>

Inheritance diagram for wex::core::stc:
Inheritance graph
[legend]

Public Types

enum  { MARGIN_DIVIDER = 0 , MARGIN_FOLDING = 1 , MARGIN_LINENUMBER = 2 , MARGIN_TEXT = 3 }
 Margin flags. More...
 

Public Member Functions

virtual const std::string eol () const =0
 Pure virtual interface. More...
 
virtual void fold (bool fold_all=false)=0
 Enables or disables folding depending on fold property. More...
 
virtual const pathget_filename () const =0
 Returns the filename, as used by the file.
 
virtual const std::string get_selected_text () const =0
 Returns selected text as a string.
 
virtual bool is_hexmode () const =0
 Returns true if we are in hex mode.
 
virtual bool is_visual () const =0
 Returns true if we are in visual mode.
 
virtual void properties_message (path::status_t flags=0)=0
 Shows properties on the statusbar using specified flags.
 
virtual void reset_margins (margin_t type=margin_t().set())=0
 Reset all margins. More...
 
virtual bool set_hexmode (bool on)=0
 Sets hex mode.
 
virtual bool set_indicator (const indicator &indicator, int start, int end)=0
 Sets an indicator at specified start and end pos.
 
virtual void set_search_flags (int flags)=0
 search flags to be used: More...
 
virtual bool vi_command (const std::string &command)=0
 Runs a vi command on this stc.
 
- Public Member Functions inherited from wex::core::text_window
virtual bool find (const std::string &text, int find_flags=-1, bool find_next=true)=0
 Pure virtual interface. More...
 
virtual int get_line_count () const =0
 Returns number of lines.
 
virtual int get_line_count_request ()=0
 Request for number of lines.
 
virtual void goto_line (int line)=0
 Goes to specified line.
 

Detailed Description

Offers a styled text ctrl.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Margin flags.

Enumerator
MARGIN_DIVIDER 

divider margin

MARGIN_FOLDING 

folding margin

MARGIN_LINENUMBER 

line number margin

MARGIN_TEXT 

text margin

Member Function Documentation

◆ eol()

virtual const std::string wex::core::stc::eol ( ) const
pure virtual

Pure virtual interface.

Returns EOL string. If you only want to insert a newline, use NewLine() (from wxStyledTextCtrl).

Implemented in wex::stc.

◆ fold()

virtual void wex::core::stc::fold ( bool  fold_all = false)
pure virtual

Enables or disables folding depending on fold property.

Parameters
fold_allif document contains more than 'Auto fold' lines, or if fold_all (and fold property is on) is specified, always all lines are folded.

Implemented in wex::stc.

◆ reset_margins()

virtual void wex::core::stc::reset_margins ( margin_t  type = margin_t().set())
pure virtual

Reset all margins.

Default also resets the divider margin.

Implemented in wex::stc.

◆ set_search_flags()

virtual void wex::core::stc::set_search_flags ( int  flags)
pure virtual

search flags to be used:

  • wxSTC_FIND_WHOLEWORD
  • wxSTC_FIND_MATCHCASE
  • wxSTC_FIND_WORDSTART
  • wxSTC_FIND_REGEXP
  • wxSTC_FIND_POSIX
  • if -1, use flags from find replace data

Implemented in wex::stc.