wex  v21.10.0
Public Member Functions | List of all members
wex::factory::frame Class Reference

Offers a frame with easy statusbar methods, find/replace, and allows for file dropping. More...

#include <wex/factory/frame.h>

Inheritance diagram for wex::factory::frame:
Inheritance graph
[legend]

Public Member Functions

virtual ~frame ()=default
 Destructor.
 
virtual factory::gridget_grid ()
 Virtual interface. More...
 
virtual factory::listviewget_listview ()
 Returns a listview.
 
virtual factory::processget_process (const std::string &command)
 Allows you to e.g. More...
 
virtual std::string get_statustext (const std::string &pane) const
 Returns text on specified pane. More...
 
virtual factory::stcget_stc ()
 Returns an stc.
 
virtual bool is_open (const path &filename)
 Returns true if file is opened in a window.
 
virtual void on_command_item_dialog (wxWindowID, const wxCommandEvent &)
 Called when an item dialog command event is triggered.
 
virtual factory::stcopen_file (const path &filename, const data::stc &data)
 Default opens the file using get_stc. More...
 
virtual factory::stcopen_file (const path &filename, const std::string &text, const data::stc &data)
 Allows you to open a filename with specified contents. More...
 
virtual factory::stcopen_file (const path &filename, const vcs_entry &vcs, const data::stc &data)
 Allows you to open a filename with info from vcs. More...
 
virtual bool output (const std::string &text) const
 Allows you to handle output text, .e.g. More...
 
virtual void set_recent_file (const path &path)
 Allows derived class to update file history.
 
virtual void statusbar_clicked (const std::string &pane)
 When (left) clicked, uses the get_stc() for some dialogs.
 
virtual void statusbar_clicked_right (const std::string &)
 Do something when statusbar is (right) clicked.
 
virtual bool statustext (const std::string &text, const std::string &pane) const
 Sets text on specified pane. More...
 
bool is_closing () const
 Other methods. More...
 
void set_find_focus (wxWindow *focus)
 Sets the find focus to specified window.
 
bool update_statusbar (const wxListView *lv)
 Updates statusbar pane items pane with values from specified listview.
 
bool update_statusbar (factory::stc *stc, const std::string &pane)
 Updates the specified statusbar pane with values from specified stc.
 
void SetMenuBar (wxMenuBar *bar) override
 Override from base class.
 

Detailed Description

Offers a frame with easy statusbar methods, find/replace, and allows for file dropping.

Also helps in maintaining access to the base controls (grid, listview and stc).

Member Function Documentation

◆ get_grid()

virtual factory::grid* wex::factory::frame::get_grid ( )
virtual

Virtual interface.

Returns a grid.

◆ get_process()

virtual factory::process* wex::factory::frame::get_process ( const std::string &  command)
inlinevirtual

Allows you to e.g.

add debugging. Default returns nullptr.

◆ get_statustext()

virtual std::string wex::factory::frame::get_statustext ( const std::string &  pane) const
inlinevirtual

Returns text on specified pane.

Don't forget to call setup_statusbar first.

Reimplemented in wex::frame.

◆ is_closing()

bool wex::factory::frame::is_closing ( ) const
inline

Other methods.

Are we closing?

◆ open_file() [1/3]

virtual factory::stc* wex::factory::frame::open_file ( const path filename,
const data::stc data 
)
virtual

Default opens the file using get_stc.

Returns stc component opened, or nullptr.

Reimplemented in wex::frame.

◆ open_file() [2/3]

virtual factory::stc* wex::factory::frame::open_file ( const path filename,
const std::string &  text,
const data::stc data 
)
virtual

Allows you to open a filename with specified contents.

Returns stc component opened, or nullptr.

◆ open_file() [3/3]

virtual factory::stc* wex::factory::frame::open_file ( const path filename,
const vcs_entry vcs,
const data::stc data 
)
inlinevirtual

Allows you to open a filename with info from vcs.

Returns stc component opened, or nullptr.

◆ output()

virtual bool wex::factory::frame::output ( const std::string &  text) const
inlinevirtual

Allows you to handle output text, .e.g.

from a process. Default no action is taken, and false is returned, and some methods default send output to stdout.

◆ statustext()

virtual bool wex::factory::frame::statustext ( const std::string &  text,
const std::string &  pane 
) const
inlinevirtual

Sets text on specified pane.

Don't forget to call setup_statusbar first.

Reimplemented in wex::frame.