source: eviacam/trunk/fuentes/wxutil/warnbaroverlap.cpp @ 567

Last change on this file since 567 was 567, checked in by mabarracus, 4 years ago

updated sources to version 2.0.3

  • Property svn:executable set to *
File size: 4.2 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// Name:        warnbaroverlap.cpp
3// Purpose:     
4// Author:      César Mauri Loba
5// Modified by:
6// Created:     Mon 14 Mar 2011 18:13:37 CET
7// RCS-ID:     
8// Copyright:   (C) 2008 Cesar Mauri from CREA Sistemes Informatics
9// Licence:     
10/////////////////////////////////////////////////////////////////////////////
11
12// For compilers that support precompilation, includes "wx/wx.h".
13#include "wx/wxprec.h"
14
15#ifdef __BORLANDC__
16#pragma hdrstop
17#endif
18
19#ifndef WX_PRECOMP
20#include "wx/wx.h"
21#endif
22
23////@begin includes
24////@end includes
25
26#include "warnbaroverlap.h"
27
28
29////@begin XPM images
30////@end XPM images
31
32
33/*!
34 * WarnBarOverlap type definition
35 */
36
37IMPLEMENT_DYNAMIC_CLASS( WarnBarOverlap, wxDialog )
38
39
40/*!
41 * WarnBarOverlap event table definition
42 */
43
44BEGIN_EVENT_TABLE( WarnBarOverlap, wxDialog )
45
46////@begin WarnBarOverlap event table entries
47    EVT_BUTTON( ID_BUTTON4, WarnBarOverlap::OnButtonOkClick )
48
49////@end WarnBarOverlap event table entries
50
51END_EVENT_TABLE()
52
53
54/*!
55 * WarnBarOverlap constructors
56 */
57
58WarnBarOverlap::WarnBarOverlap()
59{
60    Init();
61}
62
63WarnBarOverlap::WarnBarOverlap( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
64{
65    Init();
66    Create(parent, id, caption, pos, size, style);
67}
68
69
70/*!
71 * WarnBarOverlap creator
72 */
73
74bool WarnBarOverlap::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
75{
76////@begin WarnBarOverlap creation
77    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
78    wxDialog::Create( parent, id, caption, pos, size, style );
79
80    CreateControls();
81    if (GetSizer())
82    {
83        GetSizer()->SetSizeHints(this);
84    }
85    Centre();
86////@end WarnBarOverlap creation
87    return true;
88}
89
90
91/*!
92 * WarnBarOverlap destructor
93 */
94
95WarnBarOverlap::~WarnBarOverlap()
96{
97////@begin WarnBarOverlap destruction
98////@end WarnBarOverlap destruction
99}
100
101
102/*!
103 * Member initialisation
104 */
105
106void WarnBarOverlap::Init()
107{
108////@begin WarnBarOverlap member initialisation
109    m_chkWarnBarOverlap = NULL;
110    m_buttonOk = NULL;
111////@end WarnBarOverlap member initialisation
112}
113
114
115/*!
116 * Control creation for WarnBarOverlap
117 */
118
119void WarnBarOverlap::CreateControls()
120{   
121////@begin WarnBarOverlap content construction
122    WarnBarOverlap* itemDialog1 = this;
123
124    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
125    itemDialog1->SetSizer(itemBoxSizer2);
126
127    wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("The chosen Click window position is taken up by another bar.\nThis can prevent it from working properly when auto-hide mode is enabled.\nIt is recommended to move the Click window to a free position."), wxDefaultPosition, wxDefaultSize, 0 );
128    itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_LEFT|wxALL, 5);
129
130    itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
131
132    m_chkWarnBarOverlap = new wxCheckBox( itemDialog1, ID_CHECKBOX5, _("Do not show this message again"), wxDefaultPosition, wxDefaultSize, 0 );
133    m_chkWarnBarOverlap->SetValue(false);
134    itemBoxSizer2->Add(m_chkWarnBarOverlap, 0, wxALIGN_LEFT|wxALL, 5);
135
136    m_buttonOk = new wxButton( itemDialog1, ID_BUTTON4, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
137    itemBoxSizer2->Add(m_buttonOk, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
138
139////@end WarnBarOverlap content construction
140}
141
142
143/*!
144 * Should we show tooltips?
145 */
146
147bool WarnBarOverlap::ShowToolTips()
148{
149    return true;
150}
151
152/*!
153 * Get bitmap resources
154 */
155
156wxBitmap WarnBarOverlap::GetBitmapResource( const wxString& name )
157{
158    // Bitmap retrieval
159////@begin WarnBarOverlap bitmap retrieval
160    wxUnusedVar(name);
161    return wxNullBitmap;
162////@end WarnBarOverlap bitmap retrieval
163}
164
165/*!
166 * Get icon resources
167 */
168
169wxIcon WarnBarOverlap::GetIconResource( const wxString& name )
170{
171    // Icon retrieval
172////@begin WarnBarOverlap icon retrieval
173    wxUnusedVar(name);
174    return wxNullIcon;
175////@end WarnBarOverlap icon retrieval
176}
177
178
179/*!
180 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
181 */
182
183void WarnBarOverlap::OnButtonOkClick( wxCommandEvent& event )
184{
185        EndModal (m_chkWarnBarOverlap->IsChecked() ? 1 : 0);
186        event.Skip(false);
187}
188
Note: See TracBrowser for help on using the repository browser.