ET++: A sample application: iconedit
The main application class is the iconedit class, a subclass of Application.
This very simple application needs to include only three methods, and those trivially:
- It has a constructor which just calls Application::Application()
- It overrides Application::DoMakeDocuments() to create a new
IconDocument.
- It overrides Application::CanOpen() to pass it off to
IconDocument::CanOpen() (which checks to
see if it can convert the Data into a bitmap).
class iconedit: public Application {
public:
MetaDef(iconedit);
iconedit(int argc, char **argv) : Application(argc, argv)
{ }
Document *DoMakeDocuments(Symbol)
{ return new IconDocument; }
bool CanOpen(Data *data)
{ return IconDocument::CanOpen(data); }
};
Back to the top of the IconEdit description
Back to the top of the ET++ pages