More Docblocks

This commit is contained in:
Timothy Warren 2015-05-15 19:12:00 -04:00
parent 1b42eae8d8
commit 7fd17e2120
3 changed files with 26 additions and 4 deletions

View File

@ -385,9 +385,6 @@ void EditPane::_ApplyTheme(JsonValue &lexer_map)
for (int i = 0; i < max; i++) for (int i = 0; i < max; i++)
{ {
string key = lexer_map[i].asString(); string key = lexer_map[i].asString();
//wxLogDebug("Token type: %s", key);
//wxLogDebug("Lexer constant: %i", i);
// Set the foreground color, if it exists // Set the foreground color, if it exists
if ( ! theme_config->GetThemeValue("foreground", key).isNull()) if ( ! theme_config->GetThemeValue("foreground", key).isNull())

View File

@ -7,6 +7,9 @@
extern TyroMenu *Glob_menu_bar; extern TyroMenu *Glob_menu_bar;
static TabContainer *notebook; static TabContainer *notebook;
// Frame icon
#include "../../resources/xpm/tyro.xpm"
/** /**
* Constructor * Constructor
*/ */
@ -19,7 +22,7 @@ MainFrame::MainFrame(wxFrame *frame, const wxString &title)
notebook = new TabContainer(this); notebook = new TabContainer(this);
// Set the frame icon // Set the frame icon
#include "../../resources/xpm/tyro.xpm"
wxIcon app_icon(tyro_icon); wxIcon app_icon(tyro_icon);
this->SetIcon(app_icon); this->SetIcon(app_icon);

View File

@ -3,6 +3,9 @@
static LangConfig *lang_config; static LangConfig *lang_config;
/**
* Constructor
*/
TyroMenu::TyroMenu() TyroMenu::TyroMenu()
{ {
fileMenu = new wxMenu(); fileMenu = new wxMenu();
@ -24,12 +27,20 @@ TyroMenu::TyroMenu()
this->Insert(myHELP_MENU, helpMenu, "&Help"); this->Insert(myHELP_MENU, helpMenu, "&Help");
} }
/**
* Destructor
*/
TyroMenu::~TyroMenu() TyroMenu::~TyroMenu()
{ {
wxLogDebug("TyroMenu Destructor Called."); wxLogDebug("TyroMenu Destructor Called.");
delete lang_config; delete lang_config;
} }
/**
* Setup basic menu items
*
* @return void
*/
void TyroMenu::SetupMainMenus() void TyroMenu::SetupMainMenus()
{ {
// Add items to top-level menus // Add items to top-level menus
@ -65,6 +76,11 @@ void TyroMenu::SetupMainMenus()
helpMenu->Append(wxID_ABOUT, "&About...\tF1", "Show info about this application"); helpMenu->Append(wxID_ABOUT, "&About...\tF1", "Show info about this application");
} }
/**
* Create the language selection menu
*
* @return void
*/
void TyroMenu::SetupLangMenu() void TyroMenu::SetupLangMenu()
{ {
StringMap langs = lang_config->GetLangList(); StringMap langs = lang_config->GetLangList();
@ -78,6 +94,12 @@ void TyroMenu::SetupLangMenu()
} }
} }
/**
* Enable/disable controls that require a file to be open
*
* @param bool enable
* @return void
*/
void TyroMenu::EnableEditControls(bool enable) void TyroMenu::EnableEditControls(bool enable)
{ {
this->fileMenu->Enable(wxID_SAVE, enable); this->fileMenu->Enable(wxID_SAVE, enable);