reorganizing repo

git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-11-22 11:23:48 +00:00
parent 7d17505cfe
commit e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions

View file

@ -1,60 +0,0 @@
#include <stdapp/stdapp.hpp>
void stdapp::File(Bar& bar)
{
bar.Add(t_("New"), THISBACK(OnNew)).Key(K_CTRL_N).Help(t_("Create a new object"));
bar.Add(t_("Open ..."), THISBACK(OnLoad)).Key(K_CTRL_L).Help(t_("Open an existing object"));
bar.MenuSeparator();
bar.Add(t_("Save"), THISBACK(OnSave)).Key(K_CTRL_S).Help(t_("Save the current object"));
bar.Add(t_("Save as ..."), THISBACK(OnSaveAs)).Key(K_CTRL_A).Help(t_("Save the current object under a different name"));
bar.MenuSeparator();
bar.Add(t_("Print ..."), THISBACK(OnPrint)).Key(K_CTRL_P).Help(t_("Print the current object"));
bar.MenuSeparator();
bar.Add(t_("Exit"), THISBACK(Exit)).Key(K_CTRL_Q).Help(t_("Exit the application"));
}
void stdapp::OnNew()
{
Exclamation("You still have to write your own \"New\" code!");
}
void stdapp::OnLoad()
{
static FileSelector fs;
if(fs.ExecuteOpen())
{
String file_name = fs;
Exclamation("You still have to complete your own \"OnLoad\" code!");
}
else
status.Temporary(t_("Opening aborted"));
}
void stdapp::OnSave()
{
Exclamation("You still have to write your own \"Save\" code!");
}
void stdapp::OnSaveAs()
{
static FileSelector fs;
if(fs.ExecuteSaveAs())
{
String file_name = fs;
Exclamation("You still have to complete your own \"Save-as\" code!");
}
else
status.Temporary(t_("Saving-as aborted"));
}
void stdapp::OnPrint()
{
Exclamation("You still have to write your own \"Print\" code!");
}
void stdapp::Exit()
{
Close();
}