]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
"GUI" stubs for testing of CMake building procedures, preliminary examples of GUI
authorSergey Belash <sergey.belash@opencascade.com>
Fri, 7 Mar 2014 12:50:17 +0000 (16:50 +0400)
committerSergey Belash <sergey.belash@opencascade.com>
Fri, 7 Mar 2014 12:50:17 +0000 (16:50 +0400)
79 files changed:
CMakeLists.txt
src/GeomModule/GeomModule.cpp [new file with mode: 0644]
src/GeomModule/GeomModule.h [new file with mode: 0644]
src/GeomModule/GeomModule_Defs.h [new file with mode: 0644]
src/GeomModule/main_menu.xml [new file with mode: 0644]
src/XGUI/CMakeLists.txt [new file with mode: 0644]
src/XGUI/XGUI_Command.cpp [new file with mode: 0644]
src/XGUI/XGUI_Command.h [new file with mode: 0644]
src/XGUI/XGUI_Main.cpp [new file with mode: 0644]
src/XGUI/XGUI_MainMenu.cpp [new file with mode: 0644]
src/XGUI/XGUI_MainMenu.h [new file with mode: 0644]
src/XGUI/XGUI_MainWindow.cpp [new file with mode: 0644]
src/XGUI/XGUI_MainWindow.h [new file with mode: 0644]
src/XGUI/XGUI_MenuGroupPanel.cpp [new file with mode: 0644]
src/XGUI/XGUI_MenuGroupPanel.h [new file with mode: 0644]
src/XGUI/XGUI_Module.h [new file with mode: 0644]
src/XGUI/XGUI_Tools.cpp [new file with mode: 0644]
src/XGUI/XGUI_Tools.h [new file with mode: 0644]
src/XGUI/XGUI_Workbench.cpp [new file with mode: 0644]
src/XGUI/XGUI_Workbench.h [new file with mode: 0644]
src/XGUI/XGUI_Workshop.cpp [new file with mode: 0644]
src/XGUI/XGUI_Workshop.h [new file with mode: 0644]
src/XGUI/XGUI_msg_en.ts [new file with mode: 0644]
src/XGUI/XGUI_pictures.qrc [new file with mode: 0644]
src/XGUI/pictures/ViewPort.png [new file with mode: 0644]
src/XGUI/pictures/box.png [new file with mode: 0644]
src/XGUI/pictures/close.png [new file with mode: 0644]
src/XGUI/pictures/constr_folder.png [new file with mode: 0644]
src/XGUI/pictures/copy.png [new file with mode: 0644]
src/XGUI/pictures/cut.png [new file with mode: 0644]
src/XGUI/pictures/cylinder.png [new file with mode: 0644]
src/XGUI/pictures/disk.png [new file with mode: 0644]
src/XGUI/pictures/features.png [new file with mode: 0644]
src/XGUI/pictures/new.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_ambient.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_anticlockwise.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_back.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_bottom.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_camera_dump.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_clipping.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_clipping_pressed.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_clockwise.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_clone.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_fitall.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_fitarea.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_front.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_glpan.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_graduated_axes.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_left.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_maximized.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_minimized.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_pan.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_preselection.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_presets.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_reset.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_return_3d_view.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_right.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_rotate.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_rotation_point.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_scaling.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_selection.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_shoot.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_style_switch.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_top.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_triedre.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_zoom.png [new file with mode: 0644]
src/XGUI/pictures/occ_view_zooming_style_switch.png [new file with mode: 0644]
src/XGUI/pictures/open.png [new file with mode: 0644]
src/XGUI/pictures/params_folder.png [new file with mode: 0644]
src/XGUI/pictures/part_ico.png [new file with mode: 0644]
src/XGUI/pictures/paste.png [new file with mode: 0644]
src/XGUI/pictures/properties.png [new file with mode: 0644]
src/XGUI/pictures/redo.png [new file with mode: 0644]
src/XGUI/pictures/save.png [new file with mode: 0644]
src/XGUI/pictures/torus.png [new file with mode: 0644]
src/XGUI/pictures/undo.png [new file with mode: 0644]
src/XGUI/pictures/wnd_close.png [new file with mode: 0644]
src/XGUI/pictures/wnd_maximize.png [new file with mode: 0644]
src/XGUI/pictures/wnd_minimize.png [new file with mode: 0644]

index 2bc0930eaa6362303c772d2902c678213b078f45..c44ff627d7ab6571bcd022c6650048dcddb34270 100644 (file)
@@ -6,3 +6,5 @@ SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
 
 ADD_SUBDIRECTORY (src/ModelAPI)
 ADD_SUBDIRECTORY (src/Model)
+ADD_SUBDIRECTORY (src/XGUI)
+ADD_SUBDIRECTORY (src/GeomModule)
\ No newline at end of file
diff --git a/src/GeomModule/GeomModule.cpp b/src/GeomModule/GeomModule.cpp
new file mode 100644 (file)
index 0000000..de003fd
--- /dev/null
@@ -0,0 +1,35 @@
+#include "GeomModule.h"
+
+#include <QFile>
+#include <QDir>
+#include <QApplication>
+#include <QTextStream>
+
+/*!Create and return new instance of XGUI_Module*/
+extern "C" GM_EXPORT XGUI_Module* createModule()
+{
+  return new GeomModule();
+}
+
+
+GeomModule::GeomModule()
+{
+    QString aDir = qApp->applicationDirPath();
+    QString aXMLFile = aDir + QDir::separator() + "main_menu.xml";
+
+    QFile aFile(aXMLFile);
+    if (aFile.open((QIODevice::ReadOnly | QIODevice::Text))) {
+        QTextStream aTextStream(&aFile);
+        myMenuXML = aTextStream.readAll();
+    }
+}
+
+
+GeomModule::~GeomModule()
+{
+}
+
+QString GeomModule::moduleDescription() const
+{
+    return myMenuXML;
+}
\ No newline at end of file
diff --git a/src/GeomModule/GeomModule.h b/src/GeomModule/GeomModule.h
new file mode 100644 (file)
index 0000000..8ccd09a
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef GeomModule_H
+#define GeomModule_H
+
+#include "GeomModule_Defs.h"
+
+#include <XGUI_Module.h>
+
+class GM_EXPORT GeomModule : public XGUI_Module
+{
+public:
+    GeomModule();
+    virtual ~GeomModule();
+
+    virtual QString moduleDescription() const;
+
+private:
+    QString myMenuXML;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/GeomModule/GeomModule_Defs.h b/src/GeomModule/GeomModule_Defs.h
new file mode 100644 (file)
index 0000000..45697e5
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef GeomModule_Defs_H
+#define GeomModule_Defs_H
+
+
+#if defined WIN32
+#  if defined GM_EXPORTS || defined gm_EXPORTS
+#    define GM_EXPORT __declspec( dllexport )
+#  else
+#    define GM_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define GM_EXPORT
+#endif
+
+
+#endif
\ No newline at end of file
diff --git a/src/GeomModule/main_menu.xml b/src/GeomModule/main_menu.xml
new file mode 100644 (file)
index 0000000..5a81a5d
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<main_menu>
+    <workbench name="Primitives">
+        <group>
+            <operation
+                name="box_operation"
+                icon=":icons/box.png"
+                title="OPERATION_BOX_MENU"
+                tooltip="OPERATION_BOX_TIP"
+            />
+        </group>
+    </workbench>
+</main_menu>
diff --git a/src/XGUI/CMakeLists.txt b/src/XGUI/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ee41e8c
--- /dev/null
@@ -0,0 +1,60 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
+
+INCLUDE(Common)
+INCLUDE(FindQt5)
+
+SET(PROJECT_HEADERS
+       XGUI_Command.h
+       XGUI_MainMenu.h
+       XGUI_MainWindow.h
+       XGUI_MenuGroupPanel.h
+       XGUI_Module.h
+       XGUI_Tools.h
+       XGUI_Workbench.h
+       XGUI_Workshop.h
+)
+
+SET(PROJECT_AUTOMOC 
+    ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
+)
+
+SET(PROJECT_SOURCES
+       XGUI_Command.cpp
+       XGUI_Main.cpp
+       XGUI_MainMenu.cpp
+       XGUI_MainWindow.cpp
+       XGUI_MenuGroupPanel.cpp
+       XGUI_Tools.cpp
+       XGUI_Workbench.cpp
+       XGUI_Workshop.cpp
+)
+
+SET(PROJECT_RESOURCES 
+    XGUI_pictures.qrc
+)
+
+SET(TEXT_RESOURCES
+       XGUI_msg_en.ts
+)
+
+QT5_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+
+SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
+SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+
+ADD_DEFINITIONS(-DWIN32 -D_WINDOWS)
+
+ADD_EXECUTABLE(XGUI WIN32 
+       ${PROJECT_SOURCES} 
+       ${PROJECT_HEADERS} 
+       ${PROJECT_COMPILED_RESOURCES} 
+       ${TEXT_RESOURCES} 
+       ${QM_RESOURCES}
+)
+
+# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
+TARGET_LINK_LIBRARIES(XGUI ${Qt5Widgets_LIBRARIES})
+
+INSTALL(TARGETS XGUI DESTINATION bin)
+INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
diff --git a/src/XGUI/XGUI_Command.cpp b/src/XGUI/XGUI_Command.cpp
new file mode 100644 (file)
index 0000000..4c4249c
--- /dev/null
@@ -0,0 +1,42 @@
+#include "XGUI_Command.h"
+
+#include <QPushButton>
+
+XGUI_Command::XGUI_Command(QObject * parent) :
+    QWidgetAction(parent)
+{
+}
+
+XGUI_Command::XGUI_Command(const QIcon& icon, const QString& text, QObject* parent):
+    QWidgetAction(parent)
+{
+    setIcon(icon);
+    setText(text);
+}
+
+
+XGUI_Command::~XGUI_Command()
+{
+}
+
+QWidget* XGUI_Command::createWidget(QWidget* theParent)
+{
+    if (theParent->inherits("XGUI_MenuGroupPanel")) {
+        QPushButton* aBtn = new QPushButton(theParent);
+        aBtn->setIcon(icon());
+        aBtn->setText(text());
+        QKeySequence aKeys = shortcut();
+        QString aToolTip = toolTip();
+        if (!aKeys.isEmpty())
+            aToolTip = aToolTip + " (" + aKeys.toString() + ")";
+        if (!aToolTip.isEmpty())
+            aBtn->setToolTip(aToolTip);
+
+        aBtn->addAction(this);
+        connect(aBtn, SIGNAL(clicked()), this, SLOT(trigger()));
+        aBtn->setFlat(true);
+        aBtn->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
+        return aBtn;
+    }
+    return QWidgetAction::createWidget(theParent);
+}
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Command.h b/src/XGUI/XGUI_Command.h
new file mode 100644 (file)
index 0000000..8f1caf1
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef XGUI_Command_H
+#define XGUI_Command_H
+
+#include <QWidgetAction>
+
+#define MIN_BUTTON_HEIGHT 18
+#define MIN_BUTTON_WIDTH 40
+
+
+class XGUI_Command : public QWidgetAction
+{
+    Q_OBJECT
+public:
+    XGUI_Command(QObject * parent);
+    XGUI_Command(const QIcon& icon, const QString& text, QObject* parent);
+    ~XGUI_Command();
+
+protected:
+    virtual QWidget* createWidget(QWidget* theParent);
+};
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Main.cpp b/src/XGUI/XGUI_Main.cpp
new file mode 100644 (file)
index 0000000..c709f31
--- /dev/null
@@ -0,0 +1,19 @@
+
+#include "XGUI_Workshop.h"
+#include <QApplication>
+#include <QTranslator>
+
+int main(int argc, char *argv[])
+{
+    QApplication app(argc, argv);
+
+    // Install translator
+    QTranslator aTranslator;
+    aTranslator.load(app.applicationDirPath() + "\\XGUI_msg_en.qm");
+    app.installTranslator(&aTranslator);
+
+    XGUI_Workshop aWorkshop;
+    aWorkshop.startApplication();
+
+    return app.exec();
+}
diff --git a/src/XGUI/XGUI_MainMenu.cpp b/src/XGUI/XGUI_MainMenu.cpp
new file mode 100644 (file)
index 0000000..0be7579
--- /dev/null
@@ -0,0 +1,55 @@
+#include "XGUI_MainMenu.h"
+#include "XGUI_Workbench.h"
+#include "XGUI_MainWindow.h"
+
+#include <QLayout>
+#include <QTabWidget>
+#include <QLabel>
+#include <QDockWidget>
+
+XGUI_MainMenu::XGUI_MainMenu(XGUI_MainWindow *parent) :
+    QObject(parent), myDesktop(parent)
+{
+    parent->setTabPosition(Qt::TopDockWidgetArea, QTabWidget::North);
+}
+
+
+XGUI_MainMenu::~XGUI_MainMenu(void)
+{
+}
+
+int XGUI_MainMenu::addWorkbench(QString theTitle)
+{
+    QDockWidget* aDoc = new QDockWidget(myDesktop);
+    aDoc->setFeatures(QDockWidget::DockWidgetVerticalTitleBar);
+    aDoc->setAllowedAreas(Qt::TopDockWidgetArea);
+    aDoc->setWindowTitle(theTitle);
+    aDoc->setMinimumHeight(30);
+    aDoc->setContentsMargins(0, 0, 0, 0);
+
+    XGUI_Workbench* aPage = new XGUI_Workbench(aDoc);
+    aDoc->setWidget(aPage);
+
+    myDesktop->addDockWidget(Qt::TopDockWidgetArea, aDoc);
+    if (myMenuTabs.length() > 1) {
+        myDesktop->tabifyDockWidget(myMenuTabs.last(), aDoc);
+    }
+
+
+    myMenuTabs.append(aDoc);
+    return myMenuTabs.length() - 1;
+}
+
+
+int XGUI_MainMenu::addGroup(int thePageId)
+{
+    XGUI_Workbench* aPage = dynamic_cast<XGUI_Workbench*>(myMenuTabs[thePageId]->widget());
+    return aPage->addGroup();
+}
+
+void XGUI_MainMenu::addCommand(int thePageId, int theGroupId, XGUI_Command* theCommand)
+{
+    XGUI_Workbench* aPage = dynamic_cast<XGUI_Workbench*>(myMenuTabs[thePageId]->widget());
+    aPage->addCommand(theGroupId, theCommand);
+}
+
diff --git a/src/XGUI/XGUI_MainMenu.h b/src/XGUI/XGUI_MainMenu.h
new file mode 100644 (file)
index 0000000..3521be3
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef XGUI_MainMenu_H
+#define XGUI_MainMenu_H
+
+#include <QObject>
+#include <QList>
+
+class QTabWidget;
+class QLabel;
+class QAction;
+class XGUI_Command;
+class XGUI_MainWindow;
+class QDockWidget;
+
+
+class XGUI_MainMenu : public QObject
+{
+    Q_OBJECT
+public:
+    XGUI_MainMenu(XGUI_MainWindow *parent);
+    virtual ~XGUI_MainMenu();
+
+    int addWorkbench(QString theTitle);
+
+    int addGroup(int thePageId);
+
+    void addCommand(int thePageId, int theGroupId, XGUI_Command* theCommand);
+
+private:
+    XGUI_MainWindow* myDesktop;
+    QList<QDockWidget*> myMenuTabs;
+};
+
+#endif
diff --git a/src/XGUI/XGUI_MainWindow.cpp b/src/XGUI/XGUI_MainWindow.cpp
new file mode 100644 (file)
index 0000000..3c4e99b
--- /dev/null
@@ -0,0 +1,155 @@
+#include "XGUI_MainWindow.h"
+#include "XGUI_MainMenu.h"
+
+#include <QMdiArea>
+#include <QTreeWidget>
+#include <QDockWidget>
+#include <QTextEdit>
+#include <QMdiSubWindow>
+#include <QLabel>
+#include <QToolBar>
+#include <QToolButton>
+#include <QAction>
+#include <QTreeWidgetItem>
+
+XGUI_MainWindow::XGUI_MainWindow(QWidget* parent) :
+    QMainWindow(parent), myObjectBrowser(0)
+{
+    //menuBar();
+    myMenuBar = new XGUI_MainMenu(this);
+
+    QDockWidget* aDoc = new QDockWidget(this);
+    aDoc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+    aDoc->setWindowTitle(tr("OBJECT_BROWSER_TITLE"));
+    myObjectBrowser = new QTreeWidget(aDoc);
+    myObjectBrowser->setColumnCount(1);
+    myObjectBrowser->setHeaderHidden(true);
+    aDoc->setWidget(myObjectBrowser);
+    addDockWidget(Qt::LeftDockWidgetArea, aDoc);
+    aDoc->hide();
+
+    aDoc = new QDockWidget(this);
+    aDoc->setFeatures(QDockWidget::AllDockWidgetFeatures | QDockWidget::DockWidgetVerticalTitleBar);
+    aDoc->setMinimumHeight(20);
+    aDoc->setWindowTitle("Console");
+    QTextEdit* aTextEdt = new QTextEdit(aDoc);
+    aTextEdt->setText(">>>");
+    aTextEdt->setMinimumHeight(20);
+    aDoc->setWidget(aTextEdt);
+    addDockWidget(Qt::BottomDockWidgetArea, aDoc);
+
+    QMdiArea* aMdiArea = new QMdiArea(this);
+    setCentralWidget(aMdiArea);
+
+    aMdiArea->addSubWindow(getSubWindow(), Qt::FramelessWindowHint);
+
+    fillObjectBrowser();
+
+}
+
+
+QWidget* XGUI_MainWindow::getSubWindow()
+{
+    QMdiSubWindow* aSub = new QMdiSubWindow(this);
+    QLabel* aLbl = new QLabel(aSub);
+    aLbl->setFrameStyle(QFrame::Sunken);
+    aLbl->setFrameShape(QFrame::Panel);
+    aLbl->setPixmap(QPixmap(":pictures/ViewPort.png"));
+    aLbl->setScaledContents(true);
+    aSub->setWidget(aLbl);
+
+    QStringList aPictures;
+    aPictures<<":pictures/occ_view_camera_dump.png"<<":pictures/occ_view_style_switch.png";
+    aPictures<<":pictures/occ_view_triedre.png"<<":pictures/occ_view_fitall.png";
+    aPictures<<":pictures/occ_view_fitarea.png"<<":pictures/occ_view_zoom.png";
+    aPictures<<":pictures/occ_view_pan.png"<<":pictures/occ_view_glpan.png";
+    aPictures<<":pictures/occ_view_rotate.png"<<":pictures/occ_view_front.png";
+    aPictures<<":pictures/occ_view_back.png"<<":pictures/occ_view_left.png";
+    aPictures<<":pictures/occ_view_right.png"<<":pictures/occ_view_top.png";
+    aPictures<<":pictures/occ_view_bottom.png"<<":pictures/occ_view_clone.png";
+
+    QToolBar* aBar = new QToolBar(aSub);
+    aBar->setGeometry(0,0,500,30);
+
+    QAction* aBtn;
+    foreach(QString aName, aPictures) {
+        aBtn = new QAction(aBar);
+        aBtn->setIcon(QIcon(aName));
+        aBar->addAction(aBtn);
+    }
+    
+    aBar = new QToolBar(aSub);
+    aBar->setGeometry(615,0,100,25);
+    QStringList aWndIcons;
+    aWndIcons<<":pictures/wnd_minimize.png"<<":pictures/wnd_maximize.png"<<":pictures/wnd_close.png";
+    foreach(QString aName, aWndIcons) {
+        aBtn = new QAction(aBar);
+        aBtn->setIcon(QIcon(aName));
+        aBar->addAction(aBtn);
+    }
+
+    return aSub;
+}
+
+
+XGUI_MainWindow::~XGUI_MainWindow(void)
+{
+}
+
+//******************************************************
+void XGUI_MainWindow::showObjectBrowser()
+{
+    myObjectBrowser->parentWidget()->show();
+}
+
+//******************************************************
+void XGUI_MainWindow::hideObjectBrowser()
+{
+    myObjectBrowser->parentWidget()->hide();
+}
+
+//******************************************************
+void XGUI_MainWindow::fillObjectBrowser()
+{
+    QStringList aNames;
+    aNames << "Parameters" << "Constructions";
+    aNames << "Part 1" << "Part 2" << "Part 3";
+    aNames << "Properties";
+
+    QStringList aIcons;
+    aIcons << ":pictures/params_folder.png";
+    aIcons << ":pictures/constr_folder.png";
+    aIcons << ":pictures/part_ico.png";
+    aIcons << ":pictures/part_ico.png";
+    aIcons << ":pictures/part_ico.png";
+    aIcons << ":pictures/properties.png";
+
+    QList<QTreeWidgetItem*> aItems;
+    foreach(QString aName, aNames) {
+        QTreeWidgetItem* aItem = new QTreeWidgetItem(myObjectBrowser);
+        aItem->setText(0, aName);
+        aItems.append(aItem);
+    }
+    for(int i = 0; i < aItems.length(); i++) {
+        aItems[i]->setIcon(0, QIcon(aIcons[i]));
+    }
+    myObjectBrowser->addTopLevelItems(aItems);
+
+    for (int i = 2; i < 5; i++) {
+        QTreeWidgetItem* aItem = new QTreeWidgetItem(aItems[i]);
+        aItem->setText(0, "Parameters");
+        aItem->setIcon(0, QIcon(":pictures/params_folder.png"));
+
+        aItem = new QTreeWidgetItem(aItems[i]);
+        aItem->setText(0, "Construction");
+        aItem->setIcon(0, QIcon(":pictures/constr_folder.png"));
+
+        aItem = new QTreeWidgetItem(aItems[i]);
+        aItem->setText(0, "Bodies");
+        aItem->setIcon(0, QIcon(":pictures/part_ico.png"));
+
+        aItem = new QTreeWidgetItem(aItems[i]);
+        aItem->setText(0, "Features");
+        aItem->setIcon(0, QIcon(":pictures/features.png"));
+    }
+}
diff --git a/src/XGUI/XGUI_MainWindow.h b/src/XGUI/XGUI_MainWindow.h
new file mode 100644 (file)
index 0000000..dfd5703
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef XGUI_MAINWINDOW_H
+#define XGUI_MAINWINDOW_H
+
+#include <QMainWindow>
+
+class XGUI_MainMenu;
+class QTreeWidget;
+
+class XGUI_MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    XGUI_MainWindow(QWidget* parent = 0);
+    virtual ~XGUI_MainWindow();
+
+    XGUI_MainMenu* menuObject() const { return myMenuBar; }
+   
+    QTreeWidget* objectBrowser() const { return myObjectBrowser; }
+    void showObjectBrowser();
+    void hideObjectBrowser();
+
+private:
+    //!! For test purposes only
+    QWidget* getSubWindow();
+    void fillObjectBrowser();
+
+
+    XGUI_MainMenu* myMenuBar;
+    QTreeWidget* myObjectBrowser;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_MenuGroupPanel.cpp b/src/XGUI/XGUI_MenuGroupPanel.cpp
new file mode 100644 (file)
index 0000000..b88960f
--- /dev/null
@@ -0,0 +1,61 @@
+#include "XGUI_MenuGroupPanel.h"
+#include "XGUI_Command.h"
+
+#include <QLayout>
+#include <QPushButton>
+#include <QAction>
+#include <QResizeEvent>
+
+#include <math.h>
+
+XGUI_MenuGroupPanel::XGUI_MenuGroupPanel(QWidget *parent) :
+    QWidget(parent), myNewRow(0), myNewCol(0), myMaxRow(1)
+{
+    myLayout = new QGridLayout(this);
+    myLayout->setSpacing(0);
+    myLayout->setMargin(0);
+    myLayout->setContentsMargins(0,0,0,0);
+}
+
+
+void XGUI_MenuGroupPanel::addCommand(XGUI_Command* theAction)
+{
+    addWidget(theAction->requestWidget(this));
+}
+
+void XGUI_MenuGroupPanel::placeWidget(QWidget* theWgt)
+{
+    if (myMaxRow == myNewRow) {
+        myNewRow = 0;
+        myNewCol++;
+    }
+    myLayout->addWidget(theWgt, myNewRow, myNewCol, Qt::AlignLeft);
+    myNewRow++;
+}
+
+void XGUI_MenuGroupPanel::addWidget(QWidget* theWgt)
+{
+    placeWidget(theWgt);
+    myWidgets.append(theWgt);
+}
+
+
+void XGUI_MenuGroupPanel::resizeEvent(QResizeEvent* theEvent)
+{
+    QWidget::resizeEvent(theEvent);
+    if (myWidgets.size() == 0)
+        return;
+
+    int aH = theEvent->size().height();
+    int aMaxRow = (int) floor(double(aH / MIN_BUTTON_HEIGHT));
+    if (aMaxRow == myMaxRow)
+        return;
+
+    myMaxRow = aMaxRow;
+    QListIterator<QWidget*> aIt(myWidgets);
+    myNewRow = 0;
+    myNewCol = 0;
+    while (aIt.hasNext()) {
+       placeWidget(aIt.next());
+    }
+}
diff --git a/src/XGUI/XGUI_MenuGroupPanel.h b/src/XGUI/XGUI_MenuGroupPanel.h
new file mode 100644 (file)
index 0000000..7fe95cf
--- /dev/null
@@ -0,0 +1,33 @@
+
+#ifndef XGUI_MenuGroupPanel_H
+#define XGUI_MenuGroupPanel_H
+
+#include <QWidget>
+#include <QList>
+
+class QGridLayout;
+class XGUI_Command;
+
+class XGUI_MenuGroupPanel : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit XGUI_MenuGroupPanel(QWidget *parent = 0);
+
+    void addCommand(XGUI_Command* theAction);
+
+protected:
+    virtual void resizeEvent(QResizeEvent *theEvent);
+
+private:
+    void addWidget(QWidget* theWgt);
+    void placeWidget(QWidget* theWgt);
+
+    QList<QWidget*> myWidgets;
+    QGridLayout* myLayout;
+    int myNewRow;
+    int myNewCol;
+    int myMaxRow;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Module.h b/src/XGUI/XGUI_Module.h
new file mode 100644 (file)
index 0000000..bac802a
--- /dev/null
@@ -0,0 +1,24 @@
+
+#ifndef XGUI_Module_H
+#define XGUI_Module_H
+
+#include <QString>
+
+class XGUI_Module
+{
+public:
+    //! Returns a string in XML format with definition of the module commands
+    virtual QString moduleDescription() const = 0;
+};
+
+
+//! This function must return a new module instance.
+extern "C"
+{
+   typedef XGUI_Module* (*CREATE_FUNC)();
+}
+
+#define CREATE_MODULE "createModule"
+
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Tools.cpp b/src/XGUI/XGUI_Tools.cpp
new file mode 100644 (file)
index 0000000..ef83b08
--- /dev/null
@@ -0,0 +1,77 @@
+
+#include "XGUI_Tools.h"
+
+#include <QDir>
+
+
+//******************************************************************
+QString library( const QString& str )
+{
+  QString path = dir( str, false );
+  QString name = file( str, false );
+  QString ext  = extension( str );
+
+#ifndef WIN32
+  if ( !name.startsWith( "lib" ) )
+    name = QString( "lib" ) + name;
+#endif
+
+#ifdef WIN32
+  QString libExt( "dll" );
+#else
+  QString libExt( "so" );
+#endif
+
+  if ( ext.toLower() != QString( "so" ) && ext.toLower() != QString( "dll" ) )
+  {
+    if ( !name.isEmpty() && !ext.isEmpty() )
+      name += QString( "." );
+    name += ext;
+  }
+
+  ext = libExt;
+
+  QString fileName = addSlash( path ) + name + QString( "." ) + ext;
+
+  return fileName;
+}
+
+//******************************************************************
+QString dir( const QString& path, bool isAbs )
+{
+  QDir aDir = QFileInfo( path ).dir();
+  QString dirPath = isAbs ? aDir.absolutePath() : aDir.path();
+  if ( dirPath == QString( "." ) )
+    dirPath = QString();
+  return dirPath;
+}
+
+
+//******************************************************************
+QString file( const QString& path, bool withExt )
+{
+  QString fPath = path;
+  while ( !fPath.isEmpty() && ( fPath[fPath.length() - 1] =='\\' || fPath[fPath.length() - 1] == '/' ) )
+    fPath.remove( fPath.length() - 1, 1 );
+
+  if ( withExt )
+    return QFileInfo( fPath ).fileName();
+  else
+    return QFileInfo( fPath ).completeBaseName();
+}
+
+//******************************************************************
+QString extension( const QString& path, bool full )
+{
+  return full ? QFileInfo( path ).completeSuffix() : QFileInfo( path ).suffix();
+}
+
+//******************************************************************
+QString addSlash( const QString& path )
+{
+  QString res = path;
+  if ( !res.isEmpty() && res.at( res.length() - 1 ) != QChar( '/' ) &&
+       res.at( res.length() - 1 ) != QChar( '\\' ) )
+  res += QDir::separator();
+  return res;
+}
diff --git a/src/XGUI/XGUI_Tools.h b/src/XGUI/XGUI_Tools.h
new file mode 100644 (file)
index 0000000..0fe6b2f
--- /dev/null
@@ -0,0 +1,63 @@
+
+#ifndef XGUI_Tools_H
+#define XGUI_Tools_H
+
+#include <QString>
+
+/*!
+  \brief Convert the given parameter to the platform-specific library name.
+
+  The function appends platform-specific prefix (lib) and suffix (.dll/.so)
+  to the library file name.
+  For example, if \a str = "mylib", "libmylib.so" is returned for Linux and
+  mylib.dll for Windows.
+
+  \param str short library name
+  \return full library name
+*/
+QString library( const QString& str );
+
+/*!
+  \brief Return directory part of the file path.
+
+  If the file path does not include directory part (the file is in the
+  current directory), null string is returned.
+
+  \param path file path
+  \param abs if true (default) \a path parameter is treated as absolute file path
+  \return directory part of the file path
+*/
+QString dir( const QString& path, bool isAbs = true);
+
+
+/*!
+  \brief Return file name part of the file path.
+
+  \param path file path
+  \param withExt if true (default) complete file name (with all
+         extension except the last) is returned, otherwise only base name
+         is returned
+  \return file name part of the file path
+*/
+QString file( const QString& path, bool withExt = true );
+
+/*!
+  \brief Return extension part of the file path.
+
+  \param path file path
+  \param full if true complete extension (all extensions, dot separated)
+         is returned, otherwise (default) only last extension is returned
+  \return extension part of the file path
+*/
+QString extension( const QString& path, bool full = false );
+
+
+/*!
+  \brief Add a slash (platform-specific) to the end of \a path
+         if it is not already there.
+  \param path directory path
+  \return modified path (with slash added to the end)
+*/
+QString addSlash( const QString& path );
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Workbench.cpp b/src/XGUI/XGUI_Workbench.cpp
new file mode 100644 (file)
index 0000000..9a539f1
--- /dev/null
@@ -0,0 +1,157 @@
+#include "XGUI_Workbench.h"
+#include "XGUI_MenuGroupPanel.h"
+
+#include <QLayout>
+#include <QResizeEvent>
+#include <QPushButton>
+
+
+#define SCROLL_STEP 20
+
+//**************************************************
+class CommandsArea : public QScrollArea
+{
+public:
+    CommandsArea(QWidget* theParent) : QScrollArea(theParent) {}
+
+protected:
+    virtual void resizeEvent(QResizeEvent * theEvent);
+};
+
+void CommandsArea::resizeEvent(QResizeEvent* theEvent)
+{
+    QScrollArea::resizeEvent(theEvent);
+    QRect aRect = widget()->childrenRect();
+    QSize aNewSize = theEvent->size();
+    if (aRect.width() > aNewSize.width())
+        aNewSize.setWidth(aRect.width() * 2);
+    widget()->resize(aNewSize);
+}
+
+
+//**************************************************
+XGUI_Workbench::XGUI_Workbench(QWidget *theParent) :
+    QWidget(theParent)
+{
+    setMinimumHeight(30);
+    QHBoxLayout* aMainLayout = new QHBoxLayout(this);
+    aMainLayout->setSpacing(0);
+    aMainLayout->setMargin(0);
+    aMainLayout->setContentsMargins(0,0,0,0);
+
+    myLeftButton = new QPushButton("<", this);
+    myLeftButton->setMaximumWidth(14);
+    //myLeftButton->setEnabled(false);
+    myLeftButton->setVisible(false);
+    connect(myLeftButton,SIGNAL(clicked()), this, SLOT(onLeftScroll()));
+    aMainLayout->addWidget(myLeftButton);
+
+    myCommandsArea = new CommandsArea(this);
+    aMainLayout->addWidget(myCommandsArea);
+
+    myChildWidget = new QWidget(myCommandsArea);
+    myCommandsArea->setWidget(myChildWidget);
+    myCommandsArea->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+    myCommandsArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    myCommandsArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+    myLayout = new QHBoxLayout(myChildWidget);
+    myLayout->setSpacing(0);
+    myLayout->setMargin(0);
+    myLayout->setContentsMargins(0,0,0,0);
+
+    myRightButton = new QPushButton(">", this);
+    myRightButton->setMaximumWidth(14);
+    //myRightButton->setEnabled(false);
+    myRightButton->setVisible(false);
+    connect(myRightButton,SIGNAL(clicked()), this, SLOT(onRightScroll()));
+    aMainLayout->addWidget(myRightButton);
+
+}
+
+int XGUI_Workbench::addGroup()
+{
+    if (!myLayout->isEmpty()) {
+        int aNb = myLayout->count();
+        QLayoutItem* aItem = myLayout->itemAt(aNb - 1);
+        myLayout->removeItem(aItem);
+    }
+    XGUI_MenuGroupPanel* aGroup = new XGUI_MenuGroupPanel(myChildWidget);
+    myLayout->addWidget(aGroup);
+    addSeparator();
+    myLayout->addStretch();
+    myGroups.append(aGroup);
+    return myGroups.size() - 1;
+}
+
+void XGUI_Workbench::addSeparator()
+{
+    QFrame* aLine = new QFrame(myChildWidget);
+    aLine->setFrameShape(QFrame::VLine);
+    aLine->setFrameShadow(QFrame::Sunken);
+    myLayout->addWidget(aLine);
+}
+
+void XGUI_Workbench::addCommand(int theGroupId, XGUI_Command* theCommand)
+{
+    XGUI_MenuGroupPanel* aGroup = myGroups.at(theGroupId);
+    aGroup->addCommand(theCommand);
+}
+
+
+void XGUI_Workbench::resizeEvent(QResizeEvent* theEvent)
+{
+    QWidget::resizeEvent(theEvent);
+    QSize aSize = theEvent->size();
+    myLeftButton->setMinimumHeight(aSize.height() - 2);
+    myRightButton->setMinimumHeight(aSize.height() - 2);
+
+    QSize aS = myChildWidget->sizeHint();
+       int aW = myChildWidget->width();
+       if (aW < aS.width())
+               myChildWidget->resize(aS.width(), myChildWidget->height());
+
+    //myLeftButton->setEnabled(isExceedsLeft());
+    //myRightButton->setEnabled(isExceedsRight());
+    myLeftButton->setVisible(isExceedsLeft());
+    myRightButton->setVisible(isExceedsRight());
+}
+
+
+void XGUI_Workbench::onLeftScroll()
+{
+    if (!isExceedsLeft())
+               return;
+    myChildWidget->move( myChildWidget->pos().x() + SCROLL_STEP, 0 );
+    myLeftButton->setVisible(isExceedsLeft());
+    myRightButton->setVisible(isExceedsRight());
+    //myLeftButton->setEnabled(isExceedsLeft());
+    //myRightButton->setEnabled(isExceedsRight());
+}
+
+
+void XGUI_Workbench::onRightScroll()
+{
+    if (!isExceedsRight())
+               return;
+    myChildWidget->move( myChildWidget->pos().x() - SCROLL_STEP, 0 );
+    //myLeftButton->setEnabled(isExceedsLeft());
+    //myRightButton->setEnabled(isExceedsRight());
+    myLeftButton->setVisible(isExceedsLeft());
+    myRightButton->setVisible(isExceedsRight());
+}
+
+
+bool XGUI_Workbench::isExceedsLeft()
+{
+    QPoint aPos = myChildWidget->pos();
+    return (aPos.x() < 0);
+}
+
+bool XGUI_Workbench::isExceedsRight()
+{
+    QPoint aPos = myChildWidget->pos();
+    int aVPWidth = myCommandsArea->viewport()->rect().width();
+    int aWgtWidth = myChildWidget->childrenRect().width();
+    return ((aVPWidth - aPos.x()) < aWgtWidth);
+}
diff --git a/src/XGUI/XGUI_Workbench.h b/src/XGUI/XGUI_Workbench.h
new file mode 100644 (file)
index 0000000..d791635
--- /dev/null
@@ -0,0 +1,48 @@
+
+#ifndef XGUI_Workbench_H
+#define XGUI_Workbench_H
+
+#include <QWidget>
+#include <QScrollArea>
+#include <QList>
+
+class QHBoxLayout;
+class XGUI_MenuGroupPanel;
+class QPushButton;
+class CommandsArea;
+class XGUI_Command;
+
+
+class XGUI_Workbench : public QWidget
+{
+    Q_OBJECT
+public:
+    XGUI_Workbench(QWidget* theParent);
+
+    int addGroup();
+
+    void addCommand(int theGroupId, XGUI_Command* theCommand);
+
+private slots:
+    void onLeftScroll();
+    void onRightScroll();
+
+protected:
+    virtual void resizeEvent(QResizeEvent * theEvent);
+
+private:
+    void addSeparator();
+    bool isExceedsLeft();
+    bool isExceedsRight();
+
+
+    QWidget* myChildWidget;
+    QHBoxLayout* myLayout;
+    QList<XGUI_MenuGroupPanel*> myGroups;
+
+    CommandsArea* myCommandsArea;
+    QPushButton* myRightButton;
+    QPushButton* myLeftButton;
+};
+
+#endif;
\ No newline at end of file
diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp
new file mode 100644 (file)
index 0000000..2644722
--- /dev/null
@@ -0,0 +1,255 @@
+#include "XGUI_Workshop.h"
+#include "XGUI_MainWindow.h"
+#include "XGUI_MainMenu.h"
+#include "XGUI_Command.h"
+#include "XGUI_Tools.h"
+#include "XGUI_Module.h"
+
+#include <QApplication>
+#include <QFileDialog>
+#include <QMessageBox>
+
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <dlfcn.h>
+#endif
+
+
+XGUI_Workshop::XGUI_Workshop() :
+    QObject()
+{
+    myMainWindow = new XGUI_MainWindow();
+
+    // Set Logo
+    //XGUI_MainMenu* aMenuBar = myMainWindow->menuBar();
+    //aMenuBar->setLogo(QPixmap(":pictures/OCCLogo.png"));
+}
+
+//******************************************************
+XGUI_Workshop::~XGUI_Workshop(void)
+{
+}
+
+//******************************************************
+void XGUI_Workshop::startApplication()
+{
+    initMenu();
+    //loadModules();
+    myMainWindow->show();
+}
+
+//******************************************************
+void XGUI_Workshop::initMenu()
+{
+    int aPageId = addWorkbench(tr("HOME_MENU_TITLE"));
+
+    // File commands group
+    int aGroupId = addPageGroup(aPageId);
+
+    XGUI_Command* aCommand;
+
+    aCommand = createMenuCommand(aPageId, aGroupId, NEW_CMD, tr("NEW_MENU"), tr("NEW_MENU_TIP"),
+                                 QIcon(":pictures/new.png"), QKeySequence::New);
+    connect(aCommand, SIGNAL(triggered()), this, SLOT(onNew()));
+
+    aCommand = createMenuCommand(aPageId, aGroupId, OPEN_CMD, tr("OPEN_MENU"), tr("OPEN_MENU_TIP"),
+                                 QIcon(":pictures/open.png"), QKeySequence::Open);
+    connect(aCommand, SIGNAL(triggered()), this, SLOT(onOpen()));
+
+    aCommand = createMenuCommand(aPageId, aGroupId, SAVE_CMD, tr("SAVE_MENU"), tr("SAVE_MENU_TIP"),
+                                 QIcon(":pictures/save.png"), QKeySequence::Save);
+    connect(aCommand, SIGNAL(triggered()), this, SLOT(onSave()));
+    aCommand->setEnabled(false);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, SAVEAS_CMD, tr("SAVEAS_MENU"), tr("SAVEAS_MENU_TIP"),
+                                 QIcon(":pictures/save.png"));
+    connect(aCommand, SIGNAL(triggered()), this, SLOT(onSaveAs()));
+    aCommand->setEnabled(false);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, EXIT_CMD, tr("EXIT_MENU"), tr("EXIT_MENU_TIP"),
+                                 QIcon(":pictures/close.png"), QKeySequence::Close);
+    connect(aCommand, SIGNAL(triggered()), this, SLOT(onExit()));
+
+
+    // Edit commands group
+    aGroupId = addPageGroup(aPageId);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, UNDO_CMD, tr("UNDO_MENU"), tr("UNDO_MENU_TIP"),
+                                 QIcon(":pictures/undo.png"), QKeySequence::Undo);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, REDO_CMD, tr("REDO_MENU"), tr("REDO_MENU_TIP"),
+                                 QIcon(":pictures/redo.png"), QKeySequence::Redo);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, CUT_CMD, tr("CUT_MENU"), tr("CUT_MENU_TIP"),
+                                 QIcon(":pictures/cut.png"), QKeySequence::Cut);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, COPY_CMD, tr("COPY_MENU"), tr("COPY_MENU_TIP"),
+                                 QIcon(":pictures/copy.png"), QKeySequence::Copy);
+
+    aCommand = createMenuCommand(aPageId, aGroupId, PASTE_CMD, tr("PASTE_MENU"), tr("PASTE_MENU_TIP"),
+                                 QIcon(":pictures/paste.png"), QKeySequence::Paste);
+
+    // Tests
+    aPageId = addWorkbench("Primitives");
+    aGroupId = addPageGroup(aPageId);
+    
+    aCommand = createMenuCommand(aPageId, aGroupId, LAST_CMD, "Box", "Create Box", QIcon(":pictures/box.png"));
+    aCommand = createMenuCommand(aPageId, aGroupId, LAST_CMD, "Cylinder", "Create Cylinder", QIcon(":pictures/cylinder.png"));
+    aCommand = createMenuCommand(aPageId, aGroupId, LAST_CMD, "Disk", "Create Disk", QIcon(":pictures/disk.png"));
+    aCommand = createMenuCommand(aPageId, aGroupId, LAST_CMD, "Torus", "Create Torus", QIcon(":pictures/torus.png"));
+
+    aPageId = addWorkbench("Operations");
+
+}
+
+//******************************************************
+XGUI_Command* XGUI_Workshop::createMenuCommand(int thePageId, int theGroupId, XCommandId theCmdId, 
+                                               const QString& theTitle, const QString& theTip, 
+                                               const QIcon& theIcon, const QKeySequence& theKeys)
+{
+    XGUI_Command* aCommand = new XGUI_Command(theIcon, theTitle, this);
+    aCommand->setToolTip(theTip);
+    if (!theKeys.isEmpty())
+        aCommand->setShortcut(theKeys);
+    addCommand(theCmdId, thePageId, theGroupId, aCommand);
+    return aCommand;
+}
+
+//******************************************************
+int XGUI_Workshop::addWorkbench(const QString& theName)
+{
+    XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
+    return aMenuBar->addWorkbench(theName);
+}
+
+//******************************************************
+int XGUI_Workshop::addPageGroup(int thePageId)
+{
+    XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
+    return aMenuBar->addGroup(thePageId);
+}
+
+//******************************************************
+void XGUI_Workshop::addCommand(XCommandId theCommandId, int thePageId, int theGroupId, XGUI_Command* theCommand)
+{
+    XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
+    aMenuBar->addCommand(thePageId, theGroupId, theCommand);
+    myCommands[theCommandId] = theCommand;
+}
+
+//******************************************************
+XGUI_Command* XGUI_Workshop::command(XCommandId theId) const
+{
+    if (myCommands.contains(theId))
+        return myCommands[theId];
+    return 0;
+}
+
+//******************************************************
+void XGUI_Workshop::onExit()
+{
+    qApp->exit();
+}
+
+//******************************************************
+void XGUI_Workshop::onNew()
+{
+    myMainWindow->showObjectBrowser();
+}
+
+//******************************************************
+void XGUI_Workshop::onOpen()
+{
+    QString aFileName = QFileDialog::getOpenFileName(mainWindow());
+}
+
+//******************************************************
+void XGUI_Workshop::onSave()
+{
+}
+
+//******************************************************
+void XGUI_Workshop::onSaveAs()
+{
+    QString aFileName = QFileDialog::getSaveFileName(mainWindow());
+}
+
+//******************************************************
+XGUI_Module* XGUI_Workshop::loadModule(const QString& theModule)
+{
+  QString libName = library( theModule );
+  if ( libName.isEmpty() )
+  {
+    qWarning( qPrintable( tr( "Information about module \"%1\" doesn't exist." ).arg( theModule ) ) );
+    return 0;
+  }
+
+  QString err;
+  CREATE_FUNC crtInst = 0;
+
+#ifdef WIN32
+  HINSTANCE modLib = ::LoadLibrary( (LPTSTR) libName.utf16() ); 
+  if ( !modLib )
+  {
+    LPVOID lpMsgBuf;
+    ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+                     FORMAT_MESSAGE_IGNORE_INSERTS, 0, ::GetLastError(), 0, (LPTSTR)&lpMsgBuf, 0, 0 );
+    QString aMsg((char*)&lpMsgBuf);
+    err = QString( "Failed to load  %1. %2" ).arg( libName ).arg( aMsg );
+    ::LocalFree( lpMsgBuf );
+  }
+  else
+  {
+    crtInst = (CREATE_FUNC)::GetProcAddress( modLib, CREATE_MODULE );
+    if ( !crtInst )
+    {
+      LPVOID lpMsgBuf;
+      ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
+                       FORMAT_MESSAGE_IGNORE_INSERTS, 0, ::GetLastError(), 0, (LPTSTR)&lpMsgBuf, 0, 0 );
+    QString aMsg((char*)&lpMsgBuf);
+    err = QString( "Failed to find  %1 function. %2" ).arg( CREATE_MODULE ).arg(aMsg );
+    ::LocalFree( lpMsgBuf );
+    }
+  }
+#else
+  void* modLib = dlopen( libName.toLatin1(), RTLD_LAZY );
+  if ( !modLib )
+    err = QString( "Can not load library %1. %2" ).arg( libName ).arg( dlerror() );
+  else
+  {
+    crtInst = (CREATE_FUNC)dlsym( modLib, GET_MODULE_NAME );
+    if ( !crtInst )
+      err = QString( "Failed to find function %1. %2" ).arg( CREATE_MODULE ).arg( dlerror() );
+  }
+#endif
+
+  XGUI_Module* aModule = crtInst ? crtInst() : 0;
+
+  if ( !err.isEmpty() ) {
+    if ( mainWindow() && mainWindow()->isVisible() )
+        QMessageBox::warning( mainWindow(), tr( "Error" ), err );
+    else
+      qWarning( qPrintable( err ) ); 
+  }
+  return aModule;
+}
+
+//******************************************************
+void XGUI_Workshop::loadModules()
+{
+    // Test of modules loading
+    QStringList aModules;
+    aModules << "GeomModule";
+
+    foreach(QString aName, aModules) {
+        XGUI_Module* aModule = loadModule(aName);
+        buildModuleMenu(aModule->moduleDescription());
+    }
+}
+
+//******************************************************
+void XGUI_Workshop::buildModuleMenu(const QString& theXML)
+{
+
+}
diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h
new file mode 100644 (file)
index 0000000..9b79801
--- /dev/null
@@ -0,0 +1,68 @@
+
+#ifndef XGUI_WORKSHOP_H
+#define XGUI_WORKSHOP_H
+
+#include <QObject>
+#include <QMap>
+#include <QIcon>
+#include <QKeySequence>
+
+class XGUI_MainWindow;
+class XGUI_Command;
+class XGUI_Module;
+
+class XGUI_Workshop: public QObject
+{
+       Q_OBJECT
+public:
+    enum XCommandId {
+        NEW_CMD,
+        OPEN_CMD,
+        SAVE_CMD,
+        SAVEAS_CMD,
+        EXIT_CMD,
+        UNDO_CMD,
+        REDO_CMD,
+        COPY_CMD,
+        CUT_CMD,
+        PASTE_CMD,
+        LAST_CMD
+    };
+
+       XGUI_Workshop();
+       virtual ~XGUI_Workshop();
+
+    void startApplication();
+
+    XGUI_Command* command(XCommandId theId) const;
+
+    XGUI_MainWindow* mainWindow() const { return myMainWindow; }
+
+public slots:
+    void onNew();
+    void onOpen();
+    void onSave();
+    void onSaveAs();
+    void onExit();
+
+private:
+    void initMenu();
+
+    XGUI_Module* loadModule(const QString& theModule);
+    void loadModules();
+
+    void buildModuleMenu(const QString& theXML);
+
+    int addWorkbench(const QString& theName);
+    int addPageGroup(int thePageId);
+    void addCommand(XCommandId theCommandId, int thePageId, int theGroupId, XGUI_Command* theCommand);
+    XGUI_Command* createMenuCommand(int thePageId, int theGroupId, XCommandId theCmdId, 
+                                    const QString& theTitle, const QString& theTip, 
+                                    const QIcon& theIcon = QIcon(), const QKeySequence& theKeys = QKeySequence());
+
+    QMap<int, XGUI_Command*> myCommands;
+
+    XGUI_MainWindow* myMainWindow;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/XGUI/XGUI_msg_en.ts b/src/XGUI/XGUI_msg_en.ts
new file mode 100644 (file)
index 0000000..94a8cc9
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+</context>
+<context>
+    <name>XGUI_Workshop</name>
+    <message>
+        <source>HOME_MENU_TITLE</source>
+        <translation>Home</translation>
+    </message>
+    <message>
+        <source>NEW_MENU</source>
+        <translation>New</translation>
+    </message>
+    <message>
+        <source>NEW_MENU_TIP</source>
+        <translation>Create new document</translation>
+    </message>
+    <message>
+        <source>OPEN_MENU</source>
+        <translation>Open...</translation>
+    </message>
+    <message>
+        <source>OPEN_MENU_TIP</source>
+        <translation>Open document</translation>
+    </message>
+    <message>
+        <source>SAVE_MENU</source>
+        <translation>Save</translation>
+    </message>
+    <message>
+        <source>SAVE_MENU_TIP</source>
+        <translation>Save document</translation>
+    </message>
+    <message>
+        <source>SAVEAS_MENU</source>
+        <translation>Save As...</translation>
+    </message>
+    <message>
+        <source>SAVEAS_MENU_TIP</source>
+        <translation>Save document in another file</translation>
+    </message>
+    <message>
+        <source>EXIT_MENU</source>
+        <translation>Exit</translation>
+    </message>
+    <message>
+        <source>EXIT_MENU_TIP</source>
+        <translation>Exit from application</translation>
+    </message>
+    <message>
+        <source>UNDO_MENU</source>
+        <translation>Undo</translation>
+    </message>
+    <message>
+        <source>UNDO_MENU_TIP</source>
+        <translation>Undo last command</translation>
+    </message>
+    <message>
+        <source>REDO_MENU</source>
+        <translation>Redo</translation>
+    </message>
+    <message>
+        <source>REDO_MENU_TIP</source>
+        <translation>Redo last command</translation>
+    </message>
+    <message>
+        <source>CUT_MENU</source>
+        <translation>Cut</translation>
+    </message>
+    <message>
+        <source>CUT_MENU_TIP</source>
+        <translation>Cut selected object</translation>
+    </message>
+    <message>
+        <source>COPY_MENU</source>
+        <translation>Copy</translation>
+    </message>
+    <message>
+        <source>COPY_MENU_TIP</source>
+        <translation>Copy selected object</translation>
+    </message>
+    <message>
+        <source>PASTE_MENU</source>
+        <translation>Paste</translation>
+    </message>
+    <message>
+        <source>PASTE_MENU_TIP</source>
+        <translation>Paste copied object</translation>
+    </message>
+</context>
+<context>
+    <name>XGUI_MainWindow</name>
+    <message>
+        <source>OBJECT_BROWSER_TITLE</source>
+        <translation>Object Browser</translation>
+    </message>
+</context>
+<context>
+    <name>XGUI_MainMenu</name>
+    <message>
+        <source>MENU_TITLE</source>
+        <translation>Menu</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/XGUI/XGUI_pictures.qrc b/src/XGUI/XGUI_pictures.qrc
new file mode 100644 (file)
index 0000000..f882c6c
--- /dev/null
@@ -0,0 +1,64 @@
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+     <file>pictures/new.png</file>
+     <file>pictures/open.png</file>
+     <file>pictures/save.png</file>
+     <file>pictures/close.png</file>
+     <file>pictures/copy.png</file>
+     <file>pictures/cut.png</file>
+     <file>pictures/paste.png</file>
+     <file>pictures/redo.png</file>
+     <file>pictures/undo.png</file>
+     <!--For test purposes-->
+     <file>pictures/box.png</file>
+     <file>pictures/cylinder.png</file>
+     <file>pictures/disk.png</file>
+     <file>pictures/torus.png</file>
+     <file>pictures/ViewPort.png</file>
+     
+     <file>pictures/occ_view_ambient.png</file>
+     <file>pictures/occ_view_anticlockwise.png</file>
+     <file>pictures/occ_view_back.png</file>
+     <file>pictures/occ_view_bottom.png</file>
+     <file>pictures/occ_view_camera_dump.png</file>
+     <file>pictures/occ_view_clipping.png</file>
+     <file>pictures/occ_view_clipping_pressed.png</file>
+     <file>pictures/occ_view_clockwise.png</file>
+     <file>pictures/occ_view_clone.png</file>
+     <file>pictures/occ_view_fitall.png</file>
+     <file>pictures/occ_view_fitarea.png</file>
+     <file>pictures/occ_view_front.png</file>
+     <file>pictures/occ_view_glpan.png</file>
+     <file>pictures/occ_view_graduated_axes.png</file>
+     <file>pictures/occ_view_left.png</file>
+     <file>pictures/occ_view_maximized.png</file>
+     <file>pictures/occ_view_minimized.png</file>
+     <file>pictures/occ_view_pan.png</file>
+     <file>pictures/occ_view_preselection.png</file>
+     <file>pictures/occ_view_presets.png</file>
+     <file>pictures/occ_view_reset.png</file>
+     <file>pictures/occ_view_return_3d_view.png</file>
+     <file>pictures/occ_view_right.png</file>
+     <file>pictures/occ_view_rotate.png</file>
+     <file>pictures/occ_view_rotation_point.png</file>
+     <file>pictures/occ_view_scaling.png</file>
+     <file>pictures/occ_view_selection.png</file>
+     <file>pictures/occ_view_shoot.png</file>
+     <file>pictures/occ_view_style_switch.png</file>
+     <file>pictures/occ_view_top.png</file>
+     <file>pictures/occ_view_triedre.png</file>
+     <file>pictures/occ_view_zoom.png</file>
+     <file>pictures/occ_view_zooming_style_switch.png</file>
+     
+     <file>pictures/wnd_close.png</file>
+     <file>pictures/wnd_minimize.png</file>
+     <file>pictures/wnd_maximize.png</file>
+     
+     <file>pictures/params_folder.png</file>
+     <file>pictures/constr_folder.png</file>
+     <file>pictures/part_ico.png</file>
+     <file>pictures/properties.png</file>
+     <file>pictures/features.png</file>
+     
+ </qresource>
+ </RCC>
diff --git a/src/XGUI/pictures/ViewPort.png b/src/XGUI/pictures/ViewPort.png
new file mode 100644 (file)
index 0000000..b827301
Binary files /dev/null and b/src/XGUI/pictures/ViewPort.png differ
diff --git a/src/XGUI/pictures/box.png b/src/XGUI/pictures/box.png
new file mode 100644 (file)
index 0000000..3047d92
Binary files /dev/null and b/src/XGUI/pictures/box.png differ
diff --git a/src/XGUI/pictures/close.png b/src/XGUI/pictures/close.png
new file mode 100644 (file)
index 0000000..3868c16
Binary files /dev/null and b/src/XGUI/pictures/close.png differ
diff --git a/src/XGUI/pictures/constr_folder.png b/src/XGUI/pictures/constr_folder.png
new file mode 100644 (file)
index 0000000..f82b60a
Binary files /dev/null and b/src/XGUI/pictures/constr_folder.png differ
diff --git a/src/XGUI/pictures/copy.png b/src/XGUI/pictures/copy.png
new file mode 100644 (file)
index 0000000..0c90599
Binary files /dev/null and b/src/XGUI/pictures/copy.png differ
diff --git a/src/XGUI/pictures/cut.png b/src/XGUI/pictures/cut.png
new file mode 100644 (file)
index 0000000..5f022d0
Binary files /dev/null and b/src/XGUI/pictures/cut.png differ
diff --git a/src/XGUI/pictures/cylinder.png b/src/XGUI/pictures/cylinder.png
new file mode 100644 (file)
index 0000000..a00136d
Binary files /dev/null and b/src/XGUI/pictures/cylinder.png differ
diff --git a/src/XGUI/pictures/disk.png b/src/XGUI/pictures/disk.png
new file mode 100644 (file)
index 0000000..8aad056
Binary files /dev/null and b/src/XGUI/pictures/disk.png differ
diff --git a/src/XGUI/pictures/features.png b/src/XGUI/pictures/features.png
new file mode 100644 (file)
index 0000000..eed2b5f
Binary files /dev/null and b/src/XGUI/pictures/features.png differ
diff --git a/src/XGUI/pictures/new.png b/src/XGUI/pictures/new.png
new file mode 100644 (file)
index 0000000..2321ace
Binary files /dev/null and b/src/XGUI/pictures/new.png differ
diff --git a/src/XGUI/pictures/occ_view_ambient.png b/src/XGUI/pictures/occ_view_ambient.png
new file mode 100644 (file)
index 0000000..7f41153
Binary files /dev/null and b/src/XGUI/pictures/occ_view_ambient.png differ
diff --git a/src/XGUI/pictures/occ_view_anticlockwise.png b/src/XGUI/pictures/occ_view_anticlockwise.png
new file mode 100644 (file)
index 0000000..991586f
Binary files /dev/null and b/src/XGUI/pictures/occ_view_anticlockwise.png differ
diff --git a/src/XGUI/pictures/occ_view_back.png b/src/XGUI/pictures/occ_view_back.png
new file mode 100644 (file)
index 0000000..51beb0c
Binary files /dev/null and b/src/XGUI/pictures/occ_view_back.png differ
diff --git a/src/XGUI/pictures/occ_view_bottom.png b/src/XGUI/pictures/occ_view_bottom.png
new file mode 100644 (file)
index 0000000..fa558e2
Binary files /dev/null and b/src/XGUI/pictures/occ_view_bottom.png differ
diff --git a/src/XGUI/pictures/occ_view_camera_dump.png b/src/XGUI/pictures/occ_view_camera_dump.png
new file mode 100644 (file)
index 0000000..b02616f
Binary files /dev/null and b/src/XGUI/pictures/occ_view_camera_dump.png differ
diff --git a/src/XGUI/pictures/occ_view_clipping.png b/src/XGUI/pictures/occ_view_clipping.png
new file mode 100644 (file)
index 0000000..0356a9a
Binary files /dev/null and b/src/XGUI/pictures/occ_view_clipping.png differ
diff --git a/src/XGUI/pictures/occ_view_clipping_pressed.png b/src/XGUI/pictures/occ_view_clipping_pressed.png
new file mode 100644 (file)
index 0000000..e38a8aa
Binary files /dev/null and b/src/XGUI/pictures/occ_view_clipping_pressed.png differ
diff --git a/src/XGUI/pictures/occ_view_clockwise.png b/src/XGUI/pictures/occ_view_clockwise.png
new file mode 100644 (file)
index 0000000..b25471e
Binary files /dev/null and b/src/XGUI/pictures/occ_view_clockwise.png differ
diff --git a/src/XGUI/pictures/occ_view_clone.png b/src/XGUI/pictures/occ_view_clone.png
new file mode 100644 (file)
index 0000000..441482d
Binary files /dev/null and b/src/XGUI/pictures/occ_view_clone.png differ
diff --git a/src/XGUI/pictures/occ_view_fitall.png b/src/XGUI/pictures/occ_view_fitall.png
new file mode 100644 (file)
index 0000000..87e001d
Binary files /dev/null and b/src/XGUI/pictures/occ_view_fitall.png differ
diff --git a/src/XGUI/pictures/occ_view_fitarea.png b/src/XGUI/pictures/occ_view_fitarea.png
new file mode 100644 (file)
index 0000000..450dc56
Binary files /dev/null and b/src/XGUI/pictures/occ_view_fitarea.png differ
diff --git a/src/XGUI/pictures/occ_view_front.png b/src/XGUI/pictures/occ_view_front.png
new file mode 100644 (file)
index 0000000..d917960
Binary files /dev/null and b/src/XGUI/pictures/occ_view_front.png differ
diff --git a/src/XGUI/pictures/occ_view_glpan.png b/src/XGUI/pictures/occ_view_glpan.png
new file mode 100644 (file)
index 0000000..28ab547
Binary files /dev/null and b/src/XGUI/pictures/occ_view_glpan.png differ
diff --git a/src/XGUI/pictures/occ_view_graduated_axes.png b/src/XGUI/pictures/occ_view_graduated_axes.png
new file mode 100644 (file)
index 0000000..2b44c06
Binary files /dev/null and b/src/XGUI/pictures/occ_view_graduated_axes.png differ
diff --git a/src/XGUI/pictures/occ_view_left.png b/src/XGUI/pictures/occ_view_left.png
new file mode 100644 (file)
index 0000000..1b787b0
Binary files /dev/null and b/src/XGUI/pictures/occ_view_left.png differ
diff --git a/src/XGUI/pictures/occ_view_maximized.png b/src/XGUI/pictures/occ_view_maximized.png
new file mode 100644 (file)
index 0000000..8e19d6a
Binary files /dev/null and b/src/XGUI/pictures/occ_view_maximized.png differ
diff --git a/src/XGUI/pictures/occ_view_minimized.png b/src/XGUI/pictures/occ_view_minimized.png
new file mode 100644 (file)
index 0000000..b38bbeb
Binary files /dev/null and b/src/XGUI/pictures/occ_view_minimized.png differ
diff --git a/src/XGUI/pictures/occ_view_pan.png b/src/XGUI/pictures/occ_view_pan.png
new file mode 100644 (file)
index 0000000..ec56cac
Binary files /dev/null and b/src/XGUI/pictures/occ_view_pan.png differ
diff --git a/src/XGUI/pictures/occ_view_preselection.png b/src/XGUI/pictures/occ_view_preselection.png
new file mode 100644 (file)
index 0000000..cd5baec
Binary files /dev/null and b/src/XGUI/pictures/occ_view_preselection.png differ
diff --git a/src/XGUI/pictures/occ_view_presets.png b/src/XGUI/pictures/occ_view_presets.png
new file mode 100644 (file)
index 0000000..b436f94
Binary files /dev/null and b/src/XGUI/pictures/occ_view_presets.png differ
diff --git a/src/XGUI/pictures/occ_view_reset.png b/src/XGUI/pictures/occ_view_reset.png
new file mode 100644 (file)
index 0000000..66f81e6
Binary files /dev/null and b/src/XGUI/pictures/occ_view_reset.png differ
diff --git a/src/XGUI/pictures/occ_view_return_3d_view.png b/src/XGUI/pictures/occ_view_return_3d_view.png
new file mode 100644 (file)
index 0000000..01de30b
Binary files /dev/null and b/src/XGUI/pictures/occ_view_return_3d_view.png differ
diff --git a/src/XGUI/pictures/occ_view_right.png b/src/XGUI/pictures/occ_view_right.png
new file mode 100644 (file)
index 0000000..5c6e161
Binary files /dev/null and b/src/XGUI/pictures/occ_view_right.png differ
diff --git a/src/XGUI/pictures/occ_view_rotate.png b/src/XGUI/pictures/occ_view_rotate.png
new file mode 100644 (file)
index 0000000..28ec89f
Binary files /dev/null and b/src/XGUI/pictures/occ_view_rotate.png differ
diff --git a/src/XGUI/pictures/occ_view_rotation_point.png b/src/XGUI/pictures/occ_view_rotation_point.png
new file mode 100644 (file)
index 0000000..fc303e3
Binary files /dev/null and b/src/XGUI/pictures/occ_view_rotation_point.png differ
diff --git a/src/XGUI/pictures/occ_view_scaling.png b/src/XGUI/pictures/occ_view_scaling.png
new file mode 100644 (file)
index 0000000..fa8cbbc
Binary files /dev/null and b/src/XGUI/pictures/occ_view_scaling.png differ
diff --git a/src/XGUI/pictures/occ_view_selection.png b/src/XGUI/pictures/occ_view_selection.png
new file mode 100644 (file)
index 0000000..21d18e9
Binary files /dev/null and b/src/XGUI/pictures/occ_view_selection.png differ
diff --git a/src/XGUI/pictures/occ_view_shoot.png b/src/XGUI/pictures/occ_view_shoot.png
new file mode 100644 (file)
index 0000000..fa5ba75
Binary files /dev/null and b/src/XGUI/pictures/occ_view_shoot.png differ
diff --git a/src/XGUI/pictures/occ_view_style_switch.png b/src/XGUI/pictures/occ_view_style_switch.png
new file mode 100644 (file)
index 0000000..b0a9c80
Binary files /dev/null and b/src/XGUI/pictures/occ_view_style_switch.png differ
diff --git a/src/XGUI/pictures/occ_view_top.png b/src/XGUI/pictures/occ_view_top.png
new file mode 100644 (file)
index 0000000..cef9504
Binary files /dev/null and b/src/XGUI/pictures/occ_view_top.png differ
diff --git a/src/XGUI/pictures/occ_view_triedre.png b/src/XGUI/pictures/occ_view_triedre.png
new file mode 100644 (file)
index 0000000..bc5894d
Binary files /dev/null and b/src/XGUI/pictures/occ_view_triedre.png differ
diff --git a/src/XGUI/pictures/occ_view_zoom.png b/src/XGUI/pictures/occ_view_zoom.png
new file mode 100644 (file)
index 0000000..386c966
Binary files /dev/null and b/src/XGUI/pictures/occ_view_zoom.png differ
diff --git a/src/XGUI/pictures/occ_view_zooming_style_switch.png b/src/XGUI/pictures/occ_view_zooming_style_switch.png
new file mode 100644 (file)
index 0000000..8f3a486
Binary files /dev/null and b/src/XGUI/pictures/occ_view_zooming_style_switch.png differ
diff --git a/src/XGUI/pictures/open.png b/src/XGUI/pictures/open.png
new file mode 100644 (file)
index 0000000..ef7e8d4
Binary files /dev/null and b/src/XGUI/pictures/open.png differ
diff --git a/src/XGUI/pictures/params_folder.png b/src/XGUI/pictures/params_folder.png
new file mode 100644 (file)
index 0000000..15cae7f
Binary files /dev/null and b/src/XGUI/pictures/params_folder.png differ
diff --git a/src/XGUI/pictures/part_ico.png b/src/XGUI/pictures/part_ico.png
new file mode 100644 (file)
index 0000000..16b4973
Binary files /dev/null and b/src/XGUI/pictures/part_ico.png differ
diff --git a/src/XGUI/pictures/paste.png b/src/XGUI/pictures/paste.png
new file mode 100644 (file)
index 0000000..12e3ce9
Binary files /dev/null and b/src/XGUI/pictures/paste.png differ
diff --git a/src/XGUI/pictures/properties.png b/src/XGUI/pictures/properties.png
new file mode 100644 (file)
index 0000000..62b3bae
Binary files /dev/null and b/src/XGUI/pictures/properties.png differ
diff --git a/src/XGUI/pictures/redo.png b/src/XGUI/pictures/redo.png
new file mode 100644 (file)
index 0000000..e60913e
Binary files /dev/null and b/src/XGUI/pictures/redo.png differ
diff --git a/src/XGUI/pictures/save.png b/src/XGUI/pictures/save.png
new file mode 100644 (file)
index 0000000..a4de285
Binary files /dev/null and b/src/XGUI/pictures/save.png differ
diff --git a/src/XGUI/pictures/torus.png b/src/XGUI/pictures/torus.png
new file mode 100644 (file)
index 0000000..af76fc0
Binary files /dev/null and b/src/XGUI/pictures/torus.png differ
diff --git a/src/XGUI/pictures/undo.png b/src/XGUI/pictures/undo.png
new file mode 100644 (file)
index 0000000..d69af82
Binary files /dev/null and b/src/XGUI/pictures/undo.png differ
diff --git a/src/XGUI/pictures/wnd_close.png b/src/XGUI/pictures/wnd_close.png
new file mode 100644 (file)
index 0000000..74b9af9
Binary files /dev/null and b/src/XGUI/pictures/wnd_close.png differ
diff --git a/src/XGUI/pictures/wnd_maximize.png b/src/XGUI/pictures/wnd_maximize.png
new file mode 100644 (file)
index 0000000..3874a25
Binary files /dev/null and b/src/XGUI/pictures/wnd_maximize.png differ
diff --git a/src/XGUI/pictures/wnd_minimize.png b/src/XGUI/pictures/wnd_minimize.png
new file mode 100644 (file)
index 0000000..f7c3f7b
Binary files /dev/null and b/src/XGUI/pictures/wnd_minimize.png differ