compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -131,7 +131,6 @@ void CopyToClipboard(HWND, char *);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxMenu *popupMenu = NULL;
|
wxMenu *popupMenu = NULL;
|
||||||
void PopupFunction(wxMenu& menu, wxCommandEvent& event);
|
|
||||||
|
|
||||||
#if wxUSE_HELP
|
#if wxUSE_HELP
|
||||||
wxHelpController *HelpController = NULL;
|
wxHelpController *HelpController = NULL;
|
||||||
@@ -152,6 +151,7 @@ void CreateFonts()
|
|||||||
BEGIN_EVENT_TABLE(MainWindow, wxFrame)
|
BEGIN_EVENT_TABLE(MainWindow, wxFrame)
|
||||||
EVT_CLOSE(MainWindow::OnCloseWindow)
|
EVT_CLOSE(MainWindow::OnCloseWindow)
|
||||||
EVT_CHAR(MainWindow::OnChar)
|
EVT_CHAR(MainWindow::OnChar)
|
||||||
|
EVT_MENU(-1, MainWindow::OnPopup)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
MainWindow::MainWindow(wxFrame *frame, wxWindowID id, const wxString& title,
|
MainWindow::MainWindow(wxFrame *frame, wxWindowID id, const wxString& title,
|
||||||
@@ -616,7 +616,7 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
TheMainWindow->canvas = new MyCanvas(TheMainWindow, 501, wxDefaultPosition, wxDefaultSize);
|
TheMainWindow->canvas = new MyCanvas(TheMainWindow, 501, wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
popupMenu = new wxMenu("", (wxFunction)PopupFunction);
|
popupMenu = new wxMenu;
|
||||||
popupMenu->Append(POEM_NEXT, "Next poem/page");
|
popupMenu->Append(POEM_NEXT, "Next poem/page");
|
||||||
popupMenu->Append(POEM_PREVIOUS, "Previous page");
|
popupMenu->Append(POEM_PREVIOUS, "Previous page");
|
||||||
popupMenu->AppendSeparator();
|
popupMenu->AppendSeparator();
|
||||||
@@ -729,11 +729,10 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
long x, y;
|
|
||||||
event.Position(&x, &y);
|
|
||||||
static int startPosX, startPosY, startFrameX, startFrameY;
|
static int startPosX, startPosY, startFrameX, startFrameY;
|
||||||
|
|
||||||
event.Position(&x, &y);
|
long x, y;
|
||||||
|
event.GetPosition(&x, &y);
|
||||||
|
|
||||||
if (event.RightDown())
|
if (event.RightDown())
|
||||||
{
|
{
|
||||||
@@ -1074,7 +1073,7 @@ bool Compile(void)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupFunction(wxMenu& /*menu*/, wxCommandEvent& event)
|
void MainWindow::OnPopup(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,7 @@ class MainWindow: public wxFrame
|
|||||||
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
void OnChar(wxKeyEvent& event);
|
void OnChar(wxKeyEvent& event);
|
||||||
|
void OnPopup(wxCommandEvent& event);
|
||||||
|
|
||||||
// Display next page or poem
|
// Display next page or poem
|
||||||
void NextPage(void);
|
void NextPage(void);
|
||||||
|
Reference in New Issue
Block a user