Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef CMDDIALOG_H
00008 #define CMDDIALOG_H
00010 // Pulls in <Python.h> first
00011 #include "cmdvar.h"
00016 PyDoc_STRVAR(scribus_newdocdia__doc__,
00017 QT_TR_NOOP("newDocDialog() -> bool\n\
00018 \n\
00019 Displays the \"New Document\" dialog box. Creates a new document if the user\n\
00020 accepts the settings. Does not create a document if the user presses cancel.\n\
00021 Returns true if a new document was created.\n\
00022 "));
00024 PyObject *scribus_newdocdia(PyObject */*self*/);
00027 PyDoc_STRVAR(scribus_filedia__doc__,
00028 QT_TR_NOOP("fileDialog(\"caption\", [\"filter\", \"defaultname\", haspreview, issave, isdir]) -> string with filename\n\
00029 \n\
00030 Shows a File Open dialog box with the caption \"caption\". Files are filtered\n\
00031 with the filter string \"filter\". A default filename or file path can also\n\
00032 supplied, leave this string empty when you don't want to use it.  A value of\n\
00033 True for haspreview enables a small preview widget in the FileSelect box.  When\n\
00034 the issave parameter is set to True the dialog acts like a \"Save As\" dialog\n\
00035 otherwise it acts like a \"File Open Dialog\". When the isdir parameter is True\n\
00036 the dialog shows and returns only directories. The default for all of the\n\
00037 opional parameters is False.\n\
00038 \n\
00039 The filter, if specified, takes the form 'comment (*.type *.type2 ...)'.\n\
00040 For example 'Images (*.png *.xpm *.jpg)'.\n\
00041 \n\
00042 Refer to the Qt-Documentation for QFileDialog for details on filters.\n\
00043 \n\
00044 Example: fileDialog('Open input', 'CSV files (*.csv)')\n\
00045 Example: fileDialog('Save report', defaultname='report.txt', issave=True)\n\
00046 "));
00049 PyObject *scribus_filedia(PyObject */*self*/, PyObject* args, PyObject* kw);
00050 /* duplicity Sends a string into the Message Bar
00051 PyObject *scribus_mess(PyObject *self, PyObject* args);
00052 */
00055 PyDoc_STRVAR(scribus_messdia__doc__,
00056 QT_TR_NOOP("messageBox(\"caption\", \"message\",\n\
00057     icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,\n\
00058     button2=BUTTON_NONE, button3=BUTTON_NONE) -> integer\n\
00059 \n\
00060 Displays a message box with the title \"caption\", the message \"message\", and\n\
00061 an icon \"icon\" and up to 3 buttons. By default no icon is used and a single\n\
00062 button, OK, is displayed. Only the caption and message arguments are required,\n\
00063 though setting an icon and appropriate button(s) is strongly\n\
00064 recommended. The message text may contain simple HTML-like markup.\n\
00065 \n\
00066 Returns the number of the button the user pressed. Button numbers start\n\
00067 at 1.\n\
00068 \n\
00069 For the icon and the button parameters there are predefined constants available\n\
00070 with the same names as in the Qt Documentation. These are the BUTTON_* and\n\
00071 ICON_* constants defined in the module. There are also two extra constants that\n\
00072 can be binary-ORed with button constants:\n\
00073     BUTTONOPT_DEFAULT   Pressing enter presses this button.\n\
00074     BUTTONOPT_ESCAPE    Pressing escape presses this button.\n\
00075 \n\
00076 Usage examples:\n\
00077 result = messageBox('Script failed',\n\
00078                     'This script only works when you have a text frame selected.',\n\
00079                     ICON_ERROR)\n\
00080 result = messageBox('Monkeys!', 'Something went ook! <i>Was it a monkey?</i>',\n\
00081                     ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,\n\
00082                     BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)\n\
00083 \n\
00084 Defined button and icon constants:\n\
00088 "));
00091 PyObject *scribus_messdia(PyObject */*self*/, PyObject* args, PyObject* kw);
00094 PyDoc_STRVAR(scribus_valdialog__doc__,
00095 QT_TR_NOOP("valueDialog(caption, message [,defaultvalue]) -> string\n\
00096 \n\
00097 Shows the common 'Ask for string' dialog and returns its value as a string\n\
00098 Parameters: window title, text in the window and optional 'default' value.\n\
00099 \n\
00100 Example: valueDialog('title', 'text in the window', 'optional')\n\
00101 "));
00102 /* 09/24/2004 petr vanek */
00103 PyObject *scribus_valdialog(PyObject */*self*/, PyObject* args);
00106 PyDoc_STRVAR(scribus_newstyledialog__doc__,
00107 QT_TR_NOOP("newStyleDialog() -> string\n\
00108 \n\
00109 Shows 'Create new paragraph style' dialog. Function returns real\n\
00110 style name or None when user cancels the dialog.\n\
00111 "));
00112 /* 09/24/2004 petr vanek */
00113 PyObject *scribus_newstyledialog(PyObject * /*self*/, PyObject* args);
00115 #endif