git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55310
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "mondrian.xpm"
#endif
#include "mondrian.xpm"
#endif
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// what do we show on screen (there are too many shapes to put them all on
-// screen simultaneously)
-enum ScreenToShow
-{
- Show_Default,
- Show_Text,
- Show_Lines,
- Show_Brushes,
- Show_Polygons,
- Show_Mask,
- Show_Mask_Stretch,
- Show_Ops,
- Show_Regions,
- Show_Circles,
- Show_Splines,
-#if wxUSE_GRAPHICS_CONTEXT
- Show_Alpha,
- Show_Graphics,
-#endif
- Show_Gradient,
- Show_Max
-};
-
// ----------------------------------------------------------------------------
// global variables
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// global variables
// ----------------------------------------------------------------------------
void OnMouseDown(wxMouseEvent &event);
void OnMouseUp(wxMouseEvent &event);
void OnMouseDown(wxMouseEvent &event);
void OnMouseUp(wxMouseEvent &event);
- void ToShow(ScreenToShow show) { m_show = show; Refresh(); }
+ void ToShow(int show) { m_show = show; Refresh(); }
// set or remove the clipping region
void Clip(bool clip) { m_clip = clip; Refresh(); }
// set or remove the clipping region
void Clip(bool clip) { m_clip = clip; Refresh(); }
private:
MyFrame *m_owner;
private:
MyFrame *m_owner;
wxBitmap m_smile_bmp;
wxIcon m_std_icon;
bool m_clip;
wxBitmap m_smile_bmp;
wxIcon m_std_icon;
bool m_clip;
// missing for whatever reason
}
// missing for whatever reason
}
wxHSCROLL | wxVSCROLL | wxNO_FULL_REPAINT_ON_RESIZE)
{
m_owner = parent;
wxHSCROLL | wxVSCROLL | wxNO_FULL_REPAINT_ON_RESIZE)
{
m_owner = parent;
+ m_show = File_ShowDefault;
m_smile_bmp = wxBitmap(smile_xpm);
m_std_icon = wxArtProvider::GetIcon(wxART_INFORMATION);
m_clip = false;
m_smile_bmp = wxBitmap(smile_xpm);
m_std_icon = wxArtProvider::GetIcon(wxART_INFORMATION);
m_clip = false;
DrawTestLines( 0, 100, 0, dc );
DrawTestLines( 0, 320, 1, dc );
DrawTestLines( 0, 540, 2, dc );
DrawTestLines( 0, 760, 6, dc );
break;
DrawTestLines( 0, 100, 0, dc );
DrawTestLines( 0, 320, 1, dc );
DrawTestLines( 0, 540, 2, dc );
DrawTestLines( 0, 760, 6, dc );
break;
DrawTestBrushes(dc);
break;
DrawTestBrushes(dc);
break;
+ case File_ShowPolygons:
DrawImages(dc, Draw_Normal);
break;
DrawImages(dc, Draw_Normal);
break;
- case Show_Mask_Stretch:
+ case File_ShowMaskStretch:
DrawImages(dc, Draw_Stretch);
break;
DrawImages(dc, Draw_Stretch);
break;
DrawWithLogicalOps(dc);
break;
#if wxUSE_GRAPHICS_CONTEXT
DrawWithLogicalOps(dc);
break;
#if wxUSE_GRAPHICS_CONTEXT
+ case File_ShowGraphics:
DrawGraphics(gdc.GetGraphicsContext());
break;
#endif
DrawGraphics(gdc.GetGraphicsContext());
break;
#endif
+ case File_ShowGradients:
DrawGradients(dc);
break;
DrawGradients(dc);
break;
void MyFrame::OnShow(wxCommandEvent& event)
{
void MyFrame::OnShow(wxCommandEvent& event)
{
- m_canvas->ToShow((ScreenToShow)(event.GetId() - MenuShow_First));
+ m_canvas->ToShow(event.GetId());
}
void MyFrame::OnOption(wxCommandEvent& event)
}
void MyFrame::OnOption(wxCommandEvent& event)