| 1 |
/*************************************************************************** |
| 2 |
* Copyright (c) 2004 Jürgen Riegel <[email protected]> * |
| 3 |
* * |
| 4 |
* This file is part of the FreeCAD CAx development system. * |
| 5 |
* * |
| 6 |
* This library is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of the GNU Library General Public * |
| 8 |
* License as published by the Free Software Foundation; either * |
| 9 |
* version 2 of the License, or (at your option) any later version. * |
| 10 |
* * |
| 11 |
* This library is distributed in the hope that it will be useful, * |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 |
* GNU Library General Public License for more details. * |
| 15 |
* * |
| 16 |
* You should have received a copy of the GNU Library General Public * |
| 17 |
* License along with this library; see the file COPYING.LIB. If not, * |
| 18 |
* write to the Free Software Foundation, Inc., 59 Temple Place, * |
| 19 |
* Suite 330, Boston, MA 02111-1307, USA * |
| 20 |
* * |
| 21 |
***************************************************************************/ |
| 22 |
|
| 23 |
|
| 24 |
#ifndef GUI_APPLICATIONPY_H |
| 25 |
#define GUI_APPLICATIONPY_H |
| 26 |
|
| 27 |
#include <Base/PyObjectBase.h> |
| 28 |
|
| 29 |
namespace Gui |
| 30 |
{ |
| 31 |
|
| 32 |
/** The ApplicationPy class |
| 33 |
* This is the Python wrapper class of Application. |
| 34 |
* @author Jürgen Riegel, Werner Mayer |
| 35 |
*/ |
| 36 |
class GuiExport ApplicationPy |
| 37 |
{ |
| 38 |
public: |
| 39 |
// clang-format off |
| 40 |
//--------------------------------------------------------------------- |
| 41 |
// python exports goes here +++++++++++++++++++++++++++++++++++++++++++ |
| 42 |
//--------------------------------------------------------------------- |
| 43 |
// static python wrapper of the exported functions |
| 44 |
static PyObject* sActivateWorkbenchHandler (PyObject *self,PyObject *args); // activates a workbench object |
| 45 |
static PyObject* sAddWorkbenchHandler (PyObject *self,PyObject *args); // adds a new workbench handler to a list |
| 46 |
static PyObject* sRemoveWorkbenchHandler (PyObject *self,PyObject *args); // removes a workbench handler from the list |
| 47 |
static PyObject* sGetWorkbenchHandler (PyObject *self,PyObject *args); // retrieves the workbench handler |
| 48 |
static PyObject* sListWorkbenchHandlers (PyObject *self,PyObject *args); // retrieves a list of all workbench handlers |
| 49 |
static PyObject* sActiveWorkbenchHandler (PyObject *self,PyObject *args); // retrieves the active workbench object |
| 50 |
static PyObject* sAddResPath (PyObject *self,PyObject *args); // adds a path where to find resources |
| 51 |
static PyObject* sAddLangPath (PyObject *self,PyObject *args); // adds a path to a qm file |
| 52 |
static PyObject* sAddIconPath (PyObject *self,PyObject *args); // adds a path to an icon file |
| 53 |
static PyObject* sAddIcon (PyObject *self,PyObject *args); // adds an icon to the cache |
| 54 |
static PyObject* sGetIcon (PyObject *self,PyObject *args); // get an icon from the cache |
| 55 |
static PyObject* sIsIconCached (PyObject *self,PyObject *args); // check if an icon is cached |
| 56 |
|
| 57 |
static PyObject* sSendActiveView (PyObject *self,PyObject *args); |
| 58 |
static PyObject* sSendFocusView (PyObject *self,PyObject *args); |
| 59 |
|
| 60 |
static PyObject* sGetMainWindow (PyObject *self,PyObject *args); |
| 61 |
static PyObject* sUpdateGui (PyObject *self,PyObject *args); |
| 62 |
static PyObject* sUpdateLocale (PyObject *self,PyObject *args); |
| 63 |
static PyObject* sGetLocale (PyObject *self,PyObject *args); |
| 64 |
static PyObject* sSetLocale (PyObject *self,PyObject *args); |
| 65 |
static PyObject* sSupportedLocales (PyObject *self,PyObject *args); |
| 66 |
static PyObject* sCreateDialog (PyObject *self,PyObject *args); |
| 67 |
static PyObject* sAddPreferencePage (PyObject *self,PyObject *args); |
| 68 |
|
| 69 |
static PyObject* sRunCommand (PyObject *self,PyObject *args); |
| 70 |
static PyObject* sAddCommand (PyObject *self,PyObject *args); |
| 71 |
|
| 72 |
static PyObject* sHide (PyObject *self,PyObject *args); // deprecated |
| 73 |
static PyObject* sShow (PyObject *self,PyObject *args); // deprecated |
| 74 |
static PyObject* sHideObject (PyObject *self,PyObject *args); // hide view provider object |
| 75 |
static PyObject* sShowObject (PyObject *self,PyObject *args); // show view provider object |
| 76 |
|
| 77 |
static PyObject* sOpen (PyObject *self,PyObject *args); // open Python scripts |
| 78 |
static PyObject* sInsert (PyObject *self,PyObject *args); // open Python scripts |
| 79 |
static PyObject* sExport (PyObject *self,PyObject *args); |
| 80 |
static PyObject* sReload (PyObject *self,PyObject *args); // reload FCStd file |
| 81 |
static PyObject* sLoadFile (PyObject *self,PyObject *args); // open all types of files |
| 82 |
|
| 83 |
static PyObject* sCoinRemoveAllChildren (PyObject *self,PyObject *args); |
| 84 |
|
| 85 |
static PyObject* sActiveDocument (PyObject *self,PyObject *args); |
| 86 |
static PyObject* sSetActiveDocument (PyObject *self,PyObject *args); |
| 87 |
static PyObject* sActiveView (PyObject *self,PyObject *args); |
| 88 |
static PyObject* sActivateView (PyObject *self,PyObject *args); |
| 89 |
static PyObject* sGetDocument (PyObject *self,PyObject *args); |
| 90 |
static PyObject* sEditDocument (PyObject *self,PyObject *args); |
| 91 |
|
| 92 |
static PyObject* sDoCommand (PyObject *self,PyObject *args); |
| 93 |
static PyObject* sDoCommandGui (PyObject *self,PyObject *args); |
| 94 |
static PyObject* sDoCommandEval (PyObject *self,PyObject *args); |
| 95 |
static PyObject* sDoCommandSkip (PyObject *self,PyObject *args); |
| 96 |
static PyObject* sAddModule (PyObject *self,PyObject *args); |
| 97 |
|
| 98 |
static PyObject* sShowDownloads (PyObject *self,PyObject *args); |
| 99 |
static PyObject* sShowPreferences (PyObject *self,PyObject *args); |
| 100 |
static PyObject* sShowPreferencesByName (PyObject *self,PyObject *args); |
| 101 |
|
| 102 |
static PyObject* sCreateViewer (PyObject *self,PyObject *args); |
| 103 |
static PyObject* sGetMarkerIndex (PyObject *self,PyObject *args); |
| 104 |
|
| 105 |
static PyObject* sAddDocObserver (PyObject *self,PyObject *args); |
| 106 |
static PyObject* sRemoveDocObserver (PyObject *self,PyObject *args); |
| 107 |
|
| 108 |
static PyObject* sAddWbManipulator (PyObject *self,PyObject *args); |
| 109 |
static PyObject* sRemoveWbManipulator (PyObject *self,PyObject *args); |
| 110 |
|
| 111 |
static PyObject* sListUserEditModes (PyObject *self,PyObject *args); |
| 112 |
static PyObject* sGetUserEditMode (PyObject *self,PyObject *args); |
| 113 |
static PyObject* sSetUserEditMode (PyObject *self,PyObject *args); |
| 114 |
|
| 115 |
static PyObject* sSuspendWaitCursor (PyObject *self, PyObject *args); |
| 116 |
static PyObject* sResumeWaitCursor (PyObject *self, PyObject *args); |
| 117 |
|
| 118 |
static PyMethodDef Methods[]; |
| 119 |
// clang-format on |
| 120 |
}; |
| 121 |
|
| 122 |
} // namespace Gui |
| 123 |
|
| 124 |
#endif |