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:
  1. It has a constructor which just calls Application::Application()
  2. It overrides Application::DoMakeDocuments() to create a new IconDocument.
  3. 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