wex v24.04.0
Public Member Functions | List of all members
wex::ex_commandline Class Reference

Offers a ex commandline control related to a syntax::stc object, allowing you to enter ex commands for that stc object in the commandline. More...

#include <wex/ui/ex-commandline.h>

Public Member Functions

 ex_commandline (frame *frame, wxControl *prefix, const data::window &data)
 Constructor. Creates empty control.
 
 ex_commandline (frame *frame, const std::string &value=std::string(), const data::window &data=data::window())
 Constructor. Skips prefix.
 
syntax::stccontrol ()
 Returns the stc control window for the component, the commandline itself is just another stc, just as the one it is related to (through set_stc and stc).
 
auto * get_frame ()
 Returns frame.
 
const std::string get_text () const
 Get string value.
 
void on_key_down (wxKeyEvent &event)
 Handles keydown event.
 
void select_all () const
 Selects all text.
 
void set_stc (wex::syntax::stc *stc)
 Sets stc component.
 
bool set_stc (wex::syntax::stc *stc, const std::string &command)
 Sets stc component and handles string command.
 
bool set_stc (wex::syntax::stc *stc, char command)
 Sets stc component and handles char command to enter the input mode (a or c or i).
 
void set_text (const std::string &text)
 Sets text.
 
auto * stc ()
 Returns stc component.
 

Detailed Description

Offers a ex commandline control related to a syntax::stc object, allowing you to enter ex commands for that stc object in the commandline.

Member Function Documentation

◆ set_stc() [1/2]

bool wex::ex_commandline::set_stc ( wex::syntax::stc * stc,
char command )

Sets stc component and handles char command to enter the input mode (a or c or i).

Returns false if command not supported.

◆ set_stc() [2/2]

bool wex::ex_commandline::set_stc ( wex::syntax::stc * stc,
const std::string & command )

Sets stc component and handles string command.

Returns false if command not supported.