- Main Page
- Classes
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# TkDialogs Class Reference

Contains static metods for simple dialogs - message box,open and save file dialog. More...

`#include <tk_dialogs.h>`

List of all members.

## Static Public Member Functions

static int | createDialog (Ptr< TclInterp > &interp, const string &title, const string &text, int defaultButton)
| Create dialog.
static int | createDialog (Ptr< TclInterp > &interp, const string &title, const string &text, int defaultButton, const string &button0)
| Create dialog.
static int | createDialog (Ptr< TclInterp > &interp, const string &title, const string &text, int defaultButton, const string &button0, const string &button1)
| Create dialog.
static int | createDialog (Ptr< TclInterp > &interp, const string &title, const string &text, int defaultButton, const string &button0, const string &button1, const string &button2)
| Create dialog.
static int | createDialog (Ptr< TclInterp > &interp, const string &title, const string &text, int defaultButton, const list< string > &buttons)
| Create dialog.
static MBoxButton | createMBox (Ptr< TclInterp > &interp, const string &title, const string &message, MBoxType type, MBoxIcon icon, MBoxButton defaultButton)
| Create message box.
static const string & | createOpenDialog (Ptr< TclInterp > &interp)
| Create standard openfile dialog.
static const string & | createOpenDialog (Ptr< TclInterp > &interp, const string &defaultExtension, const map< string, string > &fileTypes, const string &initialDir, bool multiple, const string &title)
| Create standard open dialog.
static const string & | createSaveDialog (Ptr< TclInterp > &interp, const string &defaultExtension, const map< string, string > &fileTypes, const string &initialDir, const string &title)
| Create standard save dialog.

## Detailed Description

Contains static metods for simple dialogs - message box,open and save file dialog.

Date:
  01-12-2006

Author:
  Ondrej Svejdar

Todo:

Bug:

## Member Function Documentation

int TkDialogs::createDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | text,
|  | int | defaultButton,
|  | const list< string > & | buttons
| ) | `[static]`

| Create dialog.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | text | text to display
  | defaultButton | mbut_abort, mbut_retry, mbut_cancel, mbut_ok , mbut_yes, mbut_no
  | buttons | for each item in this list would be created one button

Returns:
  int index of pressed button

int TkDialogs::createDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | text,
|  | int | defaultButton,
|  | const string & | button0,
|  | const string & | button1,
|  | const string & | button2
| ) | `[static]`

| Create dialog.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | text | text to display
  | defaultButton | mbut_abort, mbut_retry, mbut_cancel, mbut_ok , mbut_yes, mbut_no
  | button0 | text displayed on button 0 (buttons are indexed from left to right)
  | button1 | text displayed on button 1 (buttons are indexed from left to right)
  | button2 | text displayed on button 2 (buttons are indexed from left to right)

Returns:
  int index of pressed button

int TkDialogs::createDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | text,
|  | int | defaultButton,
|  | const string & | button0,
|  | const string & | button1
| ) | `[static]`

| Create dialog.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | text | text to display
  | defaultButton | mbut_abort, mbut_retry, mbut_cancel, mbut_ok , mbut_yes, mbut_no
  | button0 | text displayed on button 0 (buttons are indexed from left to right)
  | button1 | text displayed on button 1 (buttons are indexed from left to right)

Returns:
  int index of pressed button

int TkDialogs::createDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | text,
|  | int | defaultButton,
|  | const string & | button0
| ) | `[static]`

| Create dialog.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | text | text to display
  | defaultButton | mbut_abort, mbut_retry, mbut_cancel, mbut_ok , mbut_yes, mbut_no
  | button0 | text displayed on button 0 (buttons are indexed from left to right)

Returns:
  int index of pressed button

int TkDialogs::createDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | text,
|  | int | defaultButton
| ) | `[static]`

| Create dialog.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | text | text to display
  | defaultButton | mbut_abort, mbut_retry, mbut_cancel, mbut_ok , mbut_yes, mbut_no

Returns:
  int index of pressed button

MBoxButton TkDialogs::createMBox | ( | Ptr< TclInterp > & | interp,
|  | const string & | title,
|  | const string & | message,
|  | MBoxType | type,
|  | MBoxIcon | icon,
|  | MBoxButton | defaultButton
| ) | `[static]`

| Create message box.

Parameters:

  | interp | reference to interpret
  | title | dialog title
  | message | message to display
  | type | type of message box
  | icon | displayed icon
  | defaultButton | default active button

Returns:
  index of pressed button

const string & TkDialogs::createOpenDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | defaultExtension,
|  | const map< string, string > & | fileTypes,
|  | const string & | initialDir,
|  | bool | multiple,
|  | const string & | title
| ) | `[static]`

| Create standard open dialog.

Parameters:

  | interp | reference to interpret
  | defaultExtension | active extension
  | fileTypes | associative array, key is extension, for example ".txt" value is explanation - "Text files"
  | initialDir | initial directory
  | multiple | true, if we should open multiple files
  | title | title of dialog

Returns:
  path to selected file(s)

const string & TkDialogs::createOpenDialog | ( | Ptr< TclInterp > & | interp | ) | `[static]`

| Create standard openfile dialog.

Parameters:

  | interp | reference to interpret

Returns:
  path to selected file

const string & TkDialogs::createSaveDialog | ( | Ptr< TclInterp > & | interp,
|  | const string & | defaultExtension,
|  | const map< string, string > & | fileTypes,
|  | const string & | initialDir,
|  | const string & | title
| ) | `[static]`

| Create standard save dialog.

Parameters:

  | interp | reference to interpret
  | defaultExtension | active extension
  | fileTypes | associative array, key is extension, for example ".txt" value is explanation - "Text files"
  | initialDir | initial directory
  | title | title of dialog

Returns:
  path to selected file

The documentation for this class was generated from the following files:

- H:/projs/dotNET/eda/src/tk/gui/tk_dialogs.h
- H:/projs/dotNET/eda/src/tk/gui/tk_dialogs.cpp