~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Common/Tools/Dialog.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*!
2
 
        @file
3
 
        @author         Albert Semenov
4
 
        @date           08/2008
5
 
*/
6
 
#include "Precompiled.h"
7
 
#include "Dialog.h"
8
 
#include "DialogManager.h"
9
 
 
10
 
namespace tools
11
 
{
12
 
 
13
 
        Dialog::Dialog() :
14
 
                wraps::BaseLayout(),
15
 
                mModal(false)
16
 
        {
17
 
        }
18
 
 
19
 
        Dialog::Dialog(const std::string& _layout) :
20
 
                wraps::BaseLayout(_layout),
21
 
                mModal(false)
22
 
        {
23
 
        }
24
 
 
25
 
        Dialog::~Dialog()
26
 
        {
27
 
        }
28
 
 
29
 
        void Dialog::doModal()
30
 
        {
31
 
                MYGUI_ASSERT(mModal != true, "Already modal mode");
32
 
                mModal = true;
33
 
 
34
 
                MyGUI::InputManager::getInstance().addWidgetModal(mMainWidget);
35
 
                MyGUI::LayerManager::getInstance().upLayerItem(mMainWidget);
36
 
 
37
 
                onDoModal();
38
 
 
39
 
                mMainWidget->setVisible(true);
40
 
 
41
 
                DialogManager::getInstance()._addDialog(this);
42
 
        }
43
 
 
44
 
        void Dialog::endModal()
45
 
        {
46
 
                MYGUI_ASSERT(mModal != false, "Already modal mode");
47
 
                mModal = false;
48
 
 
49
 
                mMainWidget->setVisible(false);
50
 
 
51
 
                MyGUI::InputManager::getInstance().removeWidgetModal(mMainWidget);
52
 
                DialogManager::getInstance()._removeDialog(this);
53
 
 
54
 
                onEndModal();
55
 
        }
56
 
 
57
 
} // namespace tools