wex v24.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

 frame ()
 Default constructor.
 
 frame (wxWindow *parent, wxWindowID winid, const std::string &title)
 Constructor for wxFrame.
 
 ~frame ()
 Destructor.
 
virtual factory::gridget_grid ()
 Returns a grid.
 
virtual factory::listviewget_listview ()
 Returns a listview.
 
virtual factory::processget_process (const std::string &command)
 Allows you to e.g.
 
virtual std::string get_statustext (const std::string &pane) const
 Returns text on specified pane.
 
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.
 
virtual factory::stcopen_file (const path &filename, const std::string &text, const data::stc &data)
 Allows you to open a filename with specified contents.
 
virtual factory::stcopen_file_vcs (const path &filename, vcs_entry &vcs, const data::stc &data)
 Allows you to open a filename with info from vcs.
 
virtual bool output (const std::string &text) const
 Allows you to handle output text, .e.g. from a process.
 
virtual bool process_async_system (const process_data &data)
 Runs async process.
 
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.
 
wxWindow * get_find_focus ()
 Returns the find focus.
 
bool is_closing () const
 Are we closing?
 
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_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.

◆ open_file() [1/2]

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/2]

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_vcs()

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

Allows you to open a filename with info from vcs.

Returns stc component opened, or nullptr.

◆ 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.