NCBI C++ ToolKit
project_locked_dlg.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: project_locked_dlg.cpp 31531 2014-10-20 19:56:06Z katargir $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Roman Katargin
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
34 ////@begin includes
35 ////@end includes
36 
37 #include "project_locked_dlg.hpp"
38 
39 #include <wx/sizer.h>
40 #include <wx/stattext.h>
41 #include <wx/button.h>
42 
44 
45 IMPLEMENT_DYNAMIC_CLASS( CProjectLockedDlg, wxDialog )
46 
47 BEGIN_EVENT_TABLE( CProjectLockedDlg, wxDialog )
48 
49 ////@begin CProjectLockedDlg event table entries
50 ////@end CProjectLockedDlg event table entries
51 
53 
55 {
56  Init();
57 }
58 
59 CProjectLockedDlg::CProjectLockedDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
60 {
61  Init();
62  Create(parent, id, caption, pos, size, style);
63 }
64 
65 bool CProjectLockedDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
66 {
67 ////@begin CProjectLockedDlg creation
68  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
69  wxDialog::Create( parent, id, caption, pos, size, style );
70 
72  if (GetSizer())
73  {
74  GetSizer()->SetSizeHints(this);
75  }
76  Centre();
77 ////@end CProjectLockedDlg creation
78  return true;
79 }
80 
82 {
83 ////@begin CProjectLockedDlg destruction
84 ////@end CProjectLockedDlg destruction
85 }
86 
88 {
89 ////@begin CProjectLockedDlg member initialisation
90 ////@end CProjectLockedDlg member initialisation
91 }
92 
94 {
95 ////@begin CProjectLockedDlg content construction
96  CProjectLockedDlg* itemDialog1 = this;
97 
98  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
99  itemDialog1->SetSizer(itemBoxSizer2);
100 
101  wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("The project you are trying to modify is locked by a view or a tool.\n"), wxDefaultPosition, wxDefaultSize, 0 );
102  itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP, 5);
103 
104  wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
105  itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0);
106 
107  wxButton* itemButton5 = new wxButton( itemDialog1, wxID_OK, _("Retry"), wxDefaultPosition, wxDefaultSize, 0 );
108  itemBoxSizer4->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
109 
110  wxButton* itemButton6 = new wxButton( itemDialog1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
111  itemBoxSizer4->Add(itemButton6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
112 
113 ////@end CProjectLockedDlg content construction
114 }
115 
117 {
118  return true;
119 }
120 wxBitmap CProjectLockedDlg::GetBitmapResource( const wxString& name )
121 {
122  // Bitmap retrieval
123 ////@begin CProjectLockedDlg bitmap retrieval
124  wxUnusedVar(name);
125  return wxNullBitmap;
126 ////@end CProjectLockedDlg bitmap retrieval
127 }
128 wxIcon CProjectLockedDlg::GetIconResource( const wxString& name )
129 {
130  // Icon retrieval
131 ////@begin CProjectLockedDlg icon retrieval
132  wxUnusedVar(name);
133  return wxNullIcon;
134 ////@end CProjectLockedDlg icon retrieval
135 }
136 
bool Create(wxWindow *parent, wxWindowID id=ID_CPROJECTLOCKEDDLG, const wxString &caption=_("Project Access Error"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxTAB_TRAVERSAL)
static bool ShowToolTips()
wxBitmap GetBitmapResource(const wxString &name)
wxIcon GetIconResource(const wxString &name)
#define _(proto)
Definition: ct_nlmzip_i.h:78
static void Init(void)
Definition: cursor6.c:76
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
END_EVENT_TABLE()
const struct ncbi::grid::netcache::search::fields::SIZE size
Modified on Fri Mar 01 10:07:25 2024 by modify_doxy.py rev. 669887