Code::Blocks  SVN r11506
sc_progress.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  *
5  * $Revision: 11399 $
6  * $Id: sc_progress.cpp 11399 2018-05-08 21:54:03Z fuscated $
7  * $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/sdk/scripting/bindings/sc_progress.cpp $
8  */
9 
10 #include <sdk_precomp.h>
11 
12 #ifndef CB_PRECOMP
13  #include <globals.h>
14  #include <cbexception.h>
15  #include <wx/string.h>
16 #endif
17 
18 #include <wx/progdlg.h>
19 
20 #include "sc_base_types.h"
21 
23 {
24  public:
26  : wxProgressDialog(_("Progress"),
27  _("Please wait while operation is in progress..."),
28  100, nullptr,
30  {
31  }
32 
33  ~ProgressDialog() override
34  {
35  }
36 
38  {
39  cbThrow(_T("ProgressDialog copy constructor should never be called!"));
40  }
41 
42  bool DoUpdate(int value, const wxString& newmsg)
43  {
44  return wxProgressDialog::Update(value, newmsg, nullptr);
45  }
46 };
47 
49 
50 namespace ScriptBindings
51 {
53  {
54  SqPlus::SQClassDef<ProgressDialog>("ProgressDialog").
55  emptyCtor().
56  func(&ProgressDialog::DoUpdate, "DoUpdate");
57  }
58 } // namespace ScriptBindings
virtual bool Update(int value, const wxString &newmsg=wxEmptyString, bool *skip=NULL)
ProgressDialog & operator=(const ProgressDialog &)
Definition: sc_progress.cpp:37
void Register_ProgressDialog()
Definition: sc_progress.cpp:52
#define _T(string)
#define wxPD_CAN_ABORT
null_pointer_t nullptr
Definition: nullptr.cpp:16
#define wxPD_AUTO_HIDE
#define wxPD_APP_MODAL
const wxString & _(const wxString &string)
#define cbThrow(message)
Definition: cbexception.h:42
bool DoUpdate(int value, const wxString &newmsg)
Definition: sc_progress.cpp:42
DECLARE_INSTANCE_TYPE(ProgressDialog)
~ProgressDialog() override
Definition: sc_progress.cpp:33