From fdb1340b9d3cf3ca206f472b41de4349fc51ae52 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 7 Feb 2020 09:48:56 +0100 Subject: [PATCH] EAP-GTC UI: Prevent wxChoicebook from stretching pages Signed-off-by: Simon Rozman --- lib/GTC_UI/res/wxGTC_UI.cpp | 184 ++++++++++++++++++------------------ lib/GTC_UI/res/wxGTC_UI.fbp | 2 +- lib/GTC_UI/res/wxGTC_UI.h | 152 ++++++++++++++--------------- 3 files changed, 169 insertions(+), 169 deletions(-) diff --git a/lib/GTC_UI/res/wxGTC_UI.cpp b/lib/GTC_UI/res/wxGTC_UI.cpp index 232c23f..e196578 100644 --- a/lib/GTC_UI/res/wxGTC_UI.cpp +++ b/lib/GTC_UI/res/wxGTC_UI.cpp @@ -1,92 +1,92 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 17 2015) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include - -#include "wxGTC_UI.h" - -/////////////////////////////////////////////////////////////////////////// - -wxGTCResponsePanelBase::wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style ) -{ - m_sb_response = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("GTC Challenge") ), wxVERTICAL ); - - wxBoxSizer* sb_response_horiz; - sb_response_horiz = new wxBoxSizer( wxHORIZONTAL ); - - m_response_icon = new wxStaticBitmap( m_sb_response->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - sb_response_horiz->Add( m_response_icon, 0, wxALL, FromDIP(5) ); - - m_sb_response_vert = new wxBoxSizer( wxVERTICAL ); - - m_response_label = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, _("Please provide your response."), wxDefaultPosition, wxDefaultSize, 0 ); - m_response_label->Wrap( FromDIP(440) ); - m_sb_response_vert->Add( m_response_label, 0, wxALL|wxEXPAND, FromDIP(5) ); - - wxFlexGridSizer* sb_response_tbl; - sb_response_tbl = new wxFlexGridSizer( 0, 2, FromDIP(5), FromDIP(5) ); - sb_response_tbl->AddGrowableCol( 1 ); - sb_response_tbl->SetFlexibleDirection( wxBOTH ); - sb_response_tbl->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_challenge = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, FromDIP(0) ); - m_challenge->Wrap( -1 ); - m_challenge->SetToolTip( _("Server challenge") ); - - sb_response_tbl->Add( m_challenge, 0, wxALIGN_CENTER_VERTICAL, FromDIP(5) ); - - m_response = new wxTextCtrl( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_response->SetToolTip( _("Enter your response here") ); - - sb_response_tbl->Add( m_response, 2, wxEXPAND|wxALIGN_CENTER_VERTICAL, FromDIP(5) ); - - - m_sb_response_vert->Add( sb_response_tbl, 0, wxEXPAND|wxALL, FromDIP(5) ); - - - sb_response_horiz->Add( m_sb_response_vert, 1, wxEXPAND, FromDIP(5) ); - - - m_sb_response->Add( sb_response_horiz, 0, wxEXPAND, FromDIP(5) ); - - - this->SetSizer( m_sb_response ); - this->Layout(); -} - -wxGTCResponsePanelBase::~wxGTCResponsePanelBase() -{ -} - -wxGTCConfigPanelBase::wxGTCConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style ) -{ - wxBoxSizer* sb_vertical; - sb_vertical = new wxBoxSizer( wxVERTICAL ); - - m_auth_mode_label = new wxStaticText( this, wxID_ANY, _("EAP-GTC authentication &mode:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_auth_mode_label->Wrap( -1 ); - sb_vertical->Add( m_auth_mode_label, 0, wxBOTTOM, FromDIP(5) ); - - m_auth_mode = new wxChoicebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT ); - m_auth_mode->SetToolTip( _("Select EAP-GTC authentication mode from the list") ); - - sb_vertical->Add( m_auth_mode, 1, wxEXPAND, FromDIP(5) ); - - - this->SetSizer( sb_vertical ); - this->Layout(); - - // Connect Events - this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxGTCConfigPanelBase::OnUpdateUI ) ); -} - -wxGTCConfigPanelBase::~wxGTCConfigPanelBase() -{ - // Disconnect Events - this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxGTCConfigPanelBase::OnUpdateUI ) ); - -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Aug 8 2018) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include + +#include "wxGTC_UI.h" + +/////////////////////////////////////////////////////////////////////////// + +wxGTCResponsePanelBase::wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style ) +{ + m_sb_response = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("GTC Challenge") ), wxVERTICAL ); + + wxBoxSizer* sb_response_horiz; + sb_response_horiz = new wxBoxSizer( wxHORIZONTAL ); + + m_response_icon = new wxStaticBitmap( m_sb_response->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + sb_response_horiz->Add( m_response_icon, 0, wxALL, FromDIP(5) ); + + m_sb_response_vert = new wxBoxSizer( wxVERTICAL ); + + m_response_label = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, _("Please provide your response."), wxDefaultPosition, wxDefaultSize, 0 ); + m_response_label->Wrap( FromDIP(440) ); + m_sb_response_vert->Add( m_response_label, 0, wxALL|wxEXPAND, FromDIP(5) ); + + wxFlexGridSizer* sb_response_tbl; + sb_response_tbl = new wxFlexGridSizer( 0, 2, FromDIP(5), FromDIP(5) ); + sb_response_tbl->AddGrowableCol( 1 ); + sb_response_tbl->SetFlexibleDirection( wxBOTH ); + sb_response_tbl->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_challenge = new wxStaticText( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, FromDIP(0) ); + m_challenge->Wrap( -1 ); + m_challenge->SetToolTip( _("Server challenge") ); + + sb_response_tbl->Add( m_challenge, 0, wxALIGN_CENTER_VERTICAL, FromDIP(5) ); + + m_response = new wxTextCtrl( m_sb_response->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_response->SetToolTip( _("Enter your response here") ); + + sb_response_tbl->Add( m_response, 2, wxEXPAND|wxALIGN_CENTER_VERTICAL, FromDIP(5) ); + + + m_sb_response_vert->Add( sb_response_tbl, 0, wxEXPAND|wxALL, FromDIP(5) ); + + + sb_response_horiz->Add( m_sb_response_vert, 1, wxEXPAND, FromDIP(5) ); + + + m_sb_response->Add( sb_response_horiz, 0, wxEXPAND, FromDIP(5) ); + + + this->SetSizer( m_sb_response ); + this->Layout(); +} + +wxGTCResponsePanelBase::~wxGTCResponsePanelBase() +{ +} + +wxGTCConfigPanelBase::wxGTCConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, long style ) : wxPanel( parent, id, pos, parent->FromDIP(wxSize( 500,-1 )), style ) +{ + wxBoxSizer* sb_vertical; + sb_vertical = new wxBoxSizer( wxVERTICAL ); + + m_auth_mode_label = new wxStaticText( this, wxID_ANY, _("EAP-GTC authentication &mode:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_auth_mode_label->Wrap( -1 ); + sb_vertical->Add( m_auth_mode_label, 0, wxBOTTOM, FromDIP(5) ); + + m_auth_mode = new wxChoicebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCHB_DEFAULT ); + m_auth_mode->SetToolTip( _("Select EAP-GTC authentication mode from the list") ); + + sb_vertical->Add( m_auth_mode, 0, wxEXPAND, FromDIP(5) ); + + + this->SetSizer( sb_vertical ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxGTCConfigPanelBase::OnUpdateUI ) ); +} + +wxGTCConfigPanelBase::~wxGTCConfigPanelBase() +{ + // Disconnect Events + this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxGTCConfigPanelBase::OnUpdateUI ) ); + +} diff --git a/lib/GTC_UI/res/wxGTC_UI.fbp b/lib/GTC_UI/res/wxGTC_UI.fbp index 78b2bef..ef75c60 100644 --- a/lib/GTC_UI/res/wxGTC_UI.fbp +++ b/lib/GTC_UI/res/wxGTC_UI.fbp @@ -663,7 +663,7 @@ 5 wxEXPAND - 1 + 0 1 1 diff --git a/lib/GTC_UI/res/wxGTC_UI.h b/lib/GTC_UI/res/wxGTC_UI.h index ac7e467..5f8f614 100644 --- a/lib/GTC_UI/res/wxGTC_UI.h +++ b/lib/GTC_UI/res/wxGTC_UI.h @@ -1,76 +1,76 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 17 2015) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __WXGTC_UI_H__ -#define __WXGTC_UI_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class wxGTCResponsePanelBase -/////////////////////////////////////////////////////////////////////////////// -class wxGTCResponsePanelBase : public wxPanel -{ - private: - - protected: - wxStaticBoxSizer* m_sb_response; - wxStaticBitmap* m_response_icon; - wxBoxSizer* m_sb_response_vert; - wxStaticText* m_response_label; - wxStaticText* m_challenge; - wxTextCtrl* m_response; - - public: - - wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, long style = wxTAB_TRAVERSAL ); - ~wxGTCResponsePanelBase(); - -}; - -/////////////////////////////////////////////////////////////////////////////// -/// Class wxGTCConfigPanelBase -/////////////////////////////////////////////////////////////////////////////// -class wxGTCConfigPanelBase : public wxPanel -{ - private: - - protected: - wxStaticText* m_auth_mode_label; - wxChoicebook* m_auth_mode; - - // Virtual event handlers, overide them in your derived class - virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } - - - public: - - wxGTCConfigPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, long style = wxTAB_TRAVERSAL ); - ~wxGTCConfigPanelBase(); - -}; - -#endif //__WXGTC_UI_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Aug 8 2018) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __WXGTC_UI_H__ +#define __WXGTC_UI_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class wxGTCResponsePanelBase +/////////////////////////////////////////////////////////////////////////////// +class wxGTCResponsePanelBase : public wxPanel +{ + private: + + protected: + wxStaticBoxSizer* m_sb_response; + wxStaticBitmap* m_response_icon; + wxBoxSizer* m_sb_response_vert; + wxStaticText* m_response_label; + wxStaticText* m_challenge; + wxTextCtrl* m_response; + + public: + + wxGTCResponsePanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, long style = wxTAB_TRAVERSAL ); + ~wxGTCResponsePanelBase(); + +}; + +/////////////////////////////////////////////////////////////////////////////// +/// Class wxGTCConfigPanelBase +/////////////////////////////////////////////////////////////////////////////// +class wxGTCConfigPanelBase : public wxPanel +{ + private: + + protected: + wxStaticText* m_auth_mode_label; + wxChoicebook* m_auth_mode; + + // Virtual event handlers, overide them in your derived class + virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } + + + public: + + wxGTCConfigPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, long style = wxTAB_TRAVERSAL ); + ~wxGTCConfigPanelBase(); + +}; + +#endif //__WXGTC_UI_H__