I'm creating a test program to learn how to create pages and change the focus from one to the other. Each page contains a "Next" button and a "Prev" button. The state diagram is:
Code: Select all
On Clicking Displays or changes the focus to
Page 1 Prev Page 3
Page 1 Next Page 2
Page 2 Prev Page 1
Page 2 Next Page 3
Page 3 Prev Page 2
Page 3 Next Page 1
But now I'm at a loss: I don't know what the syntax for displaying a wxWidgets form is.
Here is my MainFrame.cpp (aka Page_1) file:
Code: Select all
#include "MainFrame.h"
#include "page_2.h"
#include "page_3.h"
MainFrame::MainFrame(wxWindow* parent)
: Page_1_Class(parent)
{
}
MainFrame::~MainFrame()
{
}
void MainFrame::OnAbout(wxCommandEvent& event)
{
}
void MainFrame::OnExit(wxCommandEvent& event)
{
}
void MainFrame::OnP1_button_gotopage2ButtonClicked(wxCommandEvent& event)
{
bool rc = false;
rc = Page_2.Show(true);
rc = Page_2_Class.Show(true);
}
void MainFrame::OnP1_button_gotopage3ButtonClicked(wxCommandEvent& event)
{
}
void MainFrame::OnP1_exitButtonClicked(wxCommandEvent& event)
{
}
Here is page_2.cpp.
Code: Select all
#include "page_2.h"
#include "MainFrame.h"
#include "page_3.h"
Page_2::Page_2(wxWindow* parent)
: Page_2_Class(parent)
{
}
Page_2::~Page_2()
{
}
void Page_2::OnP2_button_gotopage1ButtonClicked(wxCommandEvent& event)
{
}
void Page_2::OnP2_button_gotopage3ButtonClicked(wxCommandEvent& event)
{
}
Code: Select all
#include "page_3.h"
Page_3::Page_3(wxWindow* parent)
: Page_3_Class(parent)
{
}
Page_3::~Page_3()
{
}
void Page_3::OnP3_button_gotopage1ButtonClicked(wxCommandEvent& event)
{
}
void Page_3::OnP3_button_gotopage2ButtonClicked(wxCommandEvent& event)
{
}
Thanks!
Software Versions:
------------------
CodeLite = 9.1.5
tdm-gcc = 5.1.0.3
Windows 7 = 6.1
wxWidgets = 3.1.0