mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 22:03:07 -06:00
Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
adf46bd64e
commit
2e4b276e07
3860 changed files with 1161787 additions and 438 deletions
60
uppdev/stdapp/stdappFile.cpp
Normal file
60
uppdev/stdapp/stdappFile.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue