Dialog

From Inkscape Wiki
Jump to navigation Jump to search

By extension, a dialog in Inkscape vocabulary is any type of window, i.e. a set of widgets with an OS decoration, a title...

Location

All dialogs are in src/ui/dialog (except for old dialogs).

Listing

Dialogs that have not yet been rewritted can be found in src/dialogs.

Re-designs

Create a new dialog

Creating a new dialog requires the following steps:

  1. Create a new dialog in src/ui/dialogs (you can find inspiration from the existing dialogs).
  2. Register your dialog in src/dialogs/dialog-manager.cpp.
  3. In src/verbs.cpp, create a new verb (new DialogVerb) and associate it (DialogVerb::perform) with the dialog's registered name to perform the appropriate action. Also include your dialog's header in the verbs.cpp file.
  4. If needed, map the new verb to the preferences (SPDesktop::show_dialogs() in src/desktop.cpp).
  5. Call the dialog from the appropriate location with dt->_dlg_mgr->showDialog("mydialog"), dt being the current SPDesktop.