~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/plugins/contrib/wxSmithContribItems/wxchart/wxchart-1.0/samples/wxchart.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        wxchart.cpp
 
3
// Purpose:     wxChart sample
 
4
// Author:      Paolo Gava
 
5
// Modified by:
 
6
// Created:
 
7
// Copyright:   (C) 2006, Paolo Gava
 
8
// RCS-ID:      $Id: wxchart.cpp 3904 2007-04-28 19:48:09Z byo $
 
9
// Licence:     wxWindows licence
 
10
/////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
 
 
13
// ----------------------------------------------------------------------------
 
14
// headers
 
15
// ----------------------------------------------------------------------------
 
16
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 
17
    #pragma implementation "wxchart.cpp"
 
18
    #pragma interface "wxchart.cpp"
 
19
#endif
 
20
 
 
21
// For compilers that support precompilation, includes "wx.h".
 
22
#include <wx/wxprec.h>
 
23
 
 
24
#ifdef __BORLANDC__
 
25
    #pragma hdrstop
 
26
#endif
 
27
 
 
28
#ifndef WX_PRECOMP
 
29
    #include <wx/wx.h>
 
30
#endif
 
31
 
 
32
#include "wx/points.h"
 
33
#include "wx/barchartpoints.h"
 
34
#include "wx/bar3dchartpoints.h"
 
35
#include "wx/chartctrl.h"
 
36
#include "wx/chartcolors.h"
 
37
#include "wx/piechartpoints.h"
 
38
#include "wx/pie3dchartpoints.h"
 
39
#include "wx/chart.h"
 
40
 
 
41
// ----------------------------------------------------------------------------
 
42
// private classes
 
43
// ----------------------------------------------------------------------------
 
44
 
 
45
class MyPanel : public wxPanel
 
46
{
 
47
public:
 
48
    MyPanel(wxFrame *frame);
 
49
    
 
50
        void ResizeChart();
 
51
        void WriteChart();
 
52
private:
 
53
        wxChartCtrl *m_pChartCtrl;
 
54
    
 
55
    // Helper routines for creating Panels
 
56
    //------------------------------------
 
57
    void CreatePanelLeft1(wxBoxSizer *sizer);
 
58
    void CreatePanelLeft2(wxBoxSizer *sizer);
 
59
    void CreatePanelRight1(wxBoxSizer *sizer);
 
60
    void CreatePanelRight2(wxBoxSizer *sizer);
 
61
};
 
62
 
 
63
 
 
64
// Define a new application type, each program should derive a class from wxApp
 
65
class MyApp : public wxApp
 
66
{
 
67
public:
 
68
    // override base class virtuals
 
69
    // ----------------------------
 
70
 
 
71
    // this one is called on application startup and is a good place for the app
 
72
    // initialization (doing it here and not in the ctor allows to have an error
 
73
    // return: if OnInit() returns false, the application terminates)
 
74
    virtual bool OnInit();
 
75
};
 
76
 
 
77
 
 
78
// Define a new frame type: this is going to be our main frame
 
79
class MyFrame : public wxFrame
 
80
{
 
81
public:
 
82
    // ctor(s)
 
83
    MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
 
84
 
 
85
    // event handlers (these functions should _not_ be virtual)
 
86
    void OnQuit(wxCommandEvent& event);
 
87
    void OnAbout(wxCommandEvent& event);
 
88
    //void OnResize(wxCommandEvent& event);
 
89
    //void OnWrite(wxCommandEvent& event);
 
90
 
 
91
private:
 
92
    MyPanel *m_panel;
 
93
 
 
94
    // any class wishing to process wxWindows events must use this macro
 
95
    DECLARE_EVENT_TABLE()
 
96
};
 
97
 
 
98
// ----------------------------------------------------------------------------
 
99
// constants
 
100
// ----------------------------------------------------------------------------
 
101
 
 
102
// IDs for the controls and the menu commands
 
103
enum
 
104
{
 
105
    // menu items
 
106
    File_About = 100,
 
107
    File_Quit,
 
108
        //Options_Resize,
 
109
        //Options_Write,
 
110
 
 
111
        Panel = 1000
 
112
};
 
113
 
 
114
// ----------------------------------------------------------------------------
 
115
// event tables and other macros for wxWindows
 
116
// ----------------------------------------------------------------------------
 
117
 
 
118
// the event tables connect the wxWindows events with the functions (event
 
119
// handlers) which process them. It can be also done at run-time, but for the
 
120
// simple menu events like this the static method is much simpler.
 
121
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
 
122
    EVT_MENU(File_Quit,  MyFrame::OnQuit)
 
123
    EVT_MENU(File_About, MyFrame::OnAbout)
 
124
    //EVT_MENU(Options_Resize, MyFrame::OnResize)
 
125
    //EVT_MENU(Options_Write, MyFrame::OnWrite)
 
126
END_EVENT_TABLE()
 
127
 
 
128
// Create a new application object: this macro will allow wxWindows to create
 
129
// the application object during program execution (it's better than using a
 
130
// static object for many reasons) and also declares the accessor function
 
131
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
 
132
// not wxApp)
 
133
IMPLEMENT_APP(MyApp)
 
134
 
 
135
// ============================================================================
 
136
// implementation
 
137
// ============================================================================
 
138
 
 
139
// ----------------------------------------------------------------------------
 
140
// the application class
 
141
// ----------------------------------------------------------------------------
 
142
 
 
143
// `Main program' equivalent: the program execution "starts" here
 
144
bool MyApp::OnInit()
 
145
{
 
146
    
 
147
        // Create the main application window
 
148
    MyFrame *frame = new MyFrame(_T("wxChart sample"),
 
149
                                 wxPoint(50, 50), wxSize(500, 400));
 
150
 
 
151
    frame->Show(TRUE);
 
152
 
 
153
    // success: wxApp::OnRun() will be called which will enter the main message
 
154
    // loop and the application will run. If we returned FALSE here, the
 
155
    // application would exit immediately.
 
156
    return TRUE;
 
157
}
 
158
 
 
159
// ----------------------------------------------------------------------------
 
160
// main frame
 
161
// ----------------------------------------------------------------------------
 
162
 
 
163
// frame constructor
 
164
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
 
165
       : wxFrame((wxFrame *)NULL, -1, title, pos, size)
 
166
{
 
167
    // create a menu bar
 
168
    wxMenu *menuFile = new wxMenu;
 
169
 
 
170
    menuFile->Append(File_About, _T("&About...\tCtrl-A"), _T("Show about dialog"));
 
171
    menuFile->AppendSeparator();
 
172
    menuFile->Append(File_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
 
173
 
 
174
    //wxMenu *menuOptions = new wxMenu;
 
175
    //menuOptions->Append( Options_Resize, _T("&Resize"), 
 
176
        //                                       _T("Fit chart to actual window size"));
 
177
    //menuOptions->Append( Options_Write, _T("&Write"), 
 
178
        //                                       _T("write chart to file"));
 
179
 
 
180
 
 
181
    // now append the freshly created menu to the menu bar...
 
182
    wxMenuBar *menuBar = new wxMenuBar;
 
183
    menuBar->Append(menuFile, _T("&File"));
 
184
    //menuBar->Append(menuOptions, _T("&Options"));
 
185
 
 
186
    // ... and attach this menu bar to the frame
 
187
    SetMenuBar(menuBar);
 
188
 
 
189
    m_panel = new MyPanel(this);
 
190
 
 
191
}
 
192
 
 
193
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 
194
{
 
195
    // TRUE is to force the frame to close
 
196
    Close(TRUE);
 
197
}
 
198
 
 
199
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 
200
{
 
201
        wxString msg = wxString::Format(
 
202
        wxT("Chart for wxWidgets. \n 2006 Paolo Gava. Ver: %d.%d.%d"), 
 
203
        wxCHART_MAJOR, wxCHART_MINOR, wxCHART_RELEASE );
 
204
 
 
205
        wxMessageBox( msg, _T("Chart"), wxOK | wxICON_INFORMATION, this );
 
206
}
 
207
 
 
208
//void MyFrame::OnResize(wxCommandEvent& WXUNUSED(event))
 
209
//{
 
210
//      m_panel->ResizeChart();
 
211
//}
 
212
 
 
213
//void MyFrame::OnWrite(wxCommandEvent& WXUNUSED(event))
 
214
//{
 
215
//      m_panel->WriteChart();
 
216
//}
 
217
 
 
218
// ----------------------------------------------------------------------------
 
219
// MyPanel
 
220
// ----------------------------------------------------------------------------
 
221
MyPanel::MyPanel(wxFrame *frame)
 
222
       : wxPanel(frame, -1)
 
223
             
 
224
{
 
225
    wxBoxSizer *VerSizer = new wxBoxSizer( wxVERTICAL );
 
226
    wxBoxSizer *Hor1Sizer = new wxBoxSizer( wxHORIZONTAL );
 
227
    wxBoxSizer *Hor2Sizer = new wxBoxSizer( wxHORIZONTAL );
 
228
    
 
229
    VerSizer->Add( Hor1Sizer, 1, wxEXPAND );
 
230
    VerSizer->Add( Hor2Sizer, 1, wxEXPAND );
 
231
    
 
232
    wxBoxSizer *Ver1Sizer = new wxBoxSizer( wxVERTICAL );
 
233
    wxBoxSizer *Ver2Sizer = new wxBoxSizer( wxVERTICAL );
 
234
    wxBoxSizer *Ver3Sizer = new wxBoxSizer( wxVERTICAL );
 
235
    wxBoxSizer *Ver4Sizer = new wxBoxSizer( wxVERTICAL );
 
236
    
 
237
    Hor1Sizer->Add( Ver1Sizer, 1, wxEXPAND );
 
238
    Hor1Sizer->Add( Ver2Sizer, 1, wxEXPAND );
 
239
    Hor2Sizer->Add( Ver3Sizer, 1, wxEXPAND );
 
240
    Hor2Sizer->Add( Ver4Sizer, 1, wxEXPAND );
 
241
    
 
242
    // Create Panel Left Row 1
 
243
    CreatePanelLeft1( Ver1Sizer );
 
244
        
 
245
    // Create Panel Right Row 1
 
246
    CreatePanelRight1(Ver2Sizer);
 
247
        
 
248
    // Create Panel Left Row2
 
249
    CreatePanelLeft2( Ver3Sizer );
 
250
    
 
251
    // Create Panel right Row2
 
252
    CreatePanelRight2(Ver4Sizer);
 
253
    
 
254
    SetAutoLayout( TRUE );
 
255
    SetSizer( VerSizer );
 
256
    VerSizer->Fit( this );
 
257
    SetAutoLayout(TRUE);
 
258
 
 
259
}
 
260
 
 
261
//+++-S-cf-------------------------------------------------------------------
 
262
//  NAME:       CreatePanelLeft1()
 
263
//  DESC:       Create left Panel first row
 
264
//  PARAMETERS: 
 
265
//      wxBoxSizer *sizer
 
266
//  RETURN:     None
 
267
//----------------------------------------------------------------------E-+++
 
268
void MyPanel::CreatePanelLeft1(wxBoxSizer *sizer)
 
269
{
 
270
    wxChartCtrl *chartLeft1;
 
271
    
 
272
    // Create Panel Left Row 1
 
273
    wxChartPoints *bcpLeft1, *bcpLeft2, *bcpLeft3, *bcpLeft4;
 
274
    
 
275
    bcpLeft1 = wxBar3DChartPoints::CreateWxBar3DChartPoints( 
 
276
        wxT("Ita") );
 
277
    
 
278
    bcpLeft2 = wxBar3DChartPoints::CreateWxBar3DChartPoints( 
 
279
        wxT("Fra") );
 
280
    
 
281
    bcpLeft3 = wxBar3DChartPoints::CreateWxBar3DChartPoints( 
 
282
        wxT("Ger") );
 
283
    
 
284
    bcpLeft4 = wxBar3DChartPoints::CreateWxBar3DChartPoints( 
 
285
        wxT("UK") );
 
286
    
 
287
    bcpLeft1->Add( wxT("val3"), 2, 3 );
 
288
    bcpLeft1->Add( wxT("val1"), 5, 1 );
 
289
    bcpLeft1->Add( wxT("val4"), 8, 4);
 
290
    bcpLeft1->Add( wxT("val2"), 15, 2 );
 
291
    bcpLeft1->Add( wxT("val5"), 20, 5 );
 
292
    bcpLeft1->SetDisplayTag( XVALUE );
 
293
    
 
294
    bcpLeft2->Add( wxT("val: 4"), 2, 4 );
 
295
    bcpLeft2->Add( wxT("val: 2"), 5, 2 );
 
296
    bcpLeft2->Add( wxT("val: 2"), 8, 2);
 
297
    bcpLeft2->Add( wxT("val: 6"), 15, 6 );
 
298
    bcpLeft2->Add( wxT("val: 2"), 20, 2 );
 
299
    bcpLeft2->SetDisplayTag( NAME );
 
300
    
 
301
    bcpLeft3->Add( wxT("val3"), 2, 1 );
 
302
    bcpLeft3->Add( wxT("val1"), 5, 3 );
 
303
    bcpLeft3->Add( wxT("val4"), 8, 4);
 
304
    bcpLeft3->Add( wxT("val2"), 15, 5 );
 
305
    bcpLeft3->Add( wxT("val5"), 20, 5 );
 
306
    bcpLeft3->SetDisplayTag( XVALUE );
 
307
    
 
308
    bcpLeft4->Add( wxT("val3"), 2, 3 );
 
309
    bcpLeft4->Add( wxT("val6"), 5, 6 );
 
310
    bcpLeft4->Add( wxT("val2"), 8, 2);
 
311
    bcpLeft4->Add( wxT("val2"), 15, 2 );
 
312
    bcpLeft4->Add( wxT("val4"), 20, 4 );
 
313
    bcpLeft4->SetDisplayTag( YVALUE );
 
314
    
 
315
    wxStaticText *lblTitle1 = new wxStaticText(this, 
 
316
                                               wxID_ANY, wxT("Bar Charts"));
 
317
    chartLeft1 = new wxChartCtrl( this, -1, DEFAULT_STYLE, 
 
318
                                   wxDefaultPosition, wxSize(200,200), 
 
319
                                   wxSUNKEN_BORDER  );
 
320
    
 
321
    chartLeft1->Add( bcpLeft1 );
 
322
    chartLeft1->Add( bcpLeft2 );
 
323
    chartLeft1->Add( bcpLeft3 );
 
324
    chartLeft1->Add( bcpLeft4 );
 
325
    
 
326
    sizer->Add( lblTitle1, 0, wxEXPAND );
 
327
    sizer->Add( chartLeft1, 1, wxEXPAND );
 
328
}
 
329
 
 
330
//+++-S-cf-------------------------------------------------------------------
 
331
//  NAME:       CreatePanelLeft2()
 
332
//  DESC:       Create left Panel second row
 
333
//  PARAMETERS: 
 
334
//      wxBoxSizer *sizer
 
335
//  RETURN:     None
 
336
//----------------------------------------------------------------------E-+++
 
337
void MyPanel::CreatePanelLeft2(wxBoxSizer *sizer)
 
338
{
 
339
    wxChartCtrl *chartLeft2;
 
340
    
 
341
    // Create Panel Left Row 2
 
342
    wxChartPoints *bcpLeft1;
 
343
    
 
344
    bcpLeft1 = wxBar3DChartPoints::CreateWxBar3DChartPoints( 
 
345
                wxT("Ita"), wxCHART_NOCOLOR, true );
 
346
    
 
347
    bcpLeft1->Add( wxT("val3"), 2, 3 );
 
348
    bcpLeft1->Add( wxT("val1"), 5, 1 );
 
349
    bcpLeft1->Add( wxT("val4"), 8, 4);
 
350
    bcpLeft1->Add( wxT("val2"), 15, 2 );
 
351
    bcpLeft1->Add( wxT("val5"), 20, 5 );
 
352
    bcpLeft1->SetDisplayTag( YVALUE );
 
353
        
 
354
    wxStaticText *lblTitle3 = new wxStaticText(this, 
 
355
                                               wxID_ANY, wxT("Bar Charts"));
 
356
    chartLeft2 = new wxChartCtrl( this, -1, 
 
357
                                   (STYLE)(USE_AXIS_X | USE_ZOOM_BUT), 
 
358
                                   wxDefaultPosition, wxSize(200,200), 
 
359
                                   wxSUNKEN_BORDER  );
 
360
    
 
361
    chartLeft2->Add( bcpLeft1 );
 
362
    
 
363
    sizer->Add( lblTitle3, 0, wxEXPAND );
 
364
    sizer->Add( chartLeft2, 1, wxEXPAND );
 
365
}
 
366
 
 
367
//+++-S-cf-------------------------------------------------------------------
 
368
//  NAME:       CreatePanelRight1()
 
369
//  DESC:       Create right Panel first row
 
370
//  PARAMETERS: 
 
371
//      wxBoxSizer *sizer
 
372
//  RETURN:     None
 
373
//----------------------------------------------------------------------E-+++
 
374
void MyPanel::CreatePanelRight1(wxBoxSizer *sizer)
 
375
{
 
376
    wxChartCtrl *chartRight1;
 
377
    
 
378
    // Create Panel Right Row 1
 
379
    wxChartPoints *pcpRight1;
 
380
    
 
381
    pcpRight1 = wxPie3DChartPoints::CreateWxPie3DChartPoints( 
 
382
        wxT("Italy"), wxCHART_NOCOLOR, true );
 
383
    
 
384
    // Pie chart ignore x value
 
385
        pcpRight1->Add( wxT("10 %"), 0, 10, wxCHART_GOLD );
 
386
        pcpRight1->Add( wxT("20 %"), 0, 20, wxCHART_CYAN );
 
387
        pcpRight1->Add( wxT("5 %"), 0, 5, wxCHART_GOLDENROD );
 
388
        pcpRight1->Add( wxT("30 %"), 0, 30, wxCHART_GRAY );
 
389
        pcpRight1->Add( wxT("10 %"), 0, 10, wxCHART_AQUAMARINE );
 
390
        pcpRight1->Add( wxT("15 %"), 0, 15, wxCHART_LYELOW );
 
391
        pcpRight1->Add( wxT("10 %"), 0, 10, wxCHART_SEAGREEN );
 
392
    pcpRight1->SetDisplayTag( NAME );
 
393
    
 
394
    wxStaticText *lblTitle2 = new wxStaticText(this, 
 
395
                                               wxID_ANY, wxT("Pie Chart"));
 
396
    chartRight1 = new wxChartCtrl( this, -1, USE_NONE, 
 
397
                                    wxDefaultPosition, wxSize(200,200), 
 
398
                                    wxSUNKEN_BORDER  );
 
399
    
 
400
    chartRight1->Add( pcpRight1 );
 
401
    
 
402
    sizer->Add( lblTitle2, 0, wxEXPAND );
 
403
    sizer->Add( chartRight1, 1, wxEXPAND );
 
404
}
 
405
 
 
406
//+++-S-cf-------------------------------------------------------------------
 
407
//  NAME:       CreatePanelRight2()
 
408
//  DESC:       Create right Panel second row
 
409
//  PARAMETERS: 
 
410
//      wxBoxSizer *sizer
 
411
//  RETURN:     None
 
412
//----------------------------------------------------------------------E-+++
 
413
void MyPanel::CreatePanelRight2(wxBoxSizer *sizer)
 
414
{
 
415
    wxChartCtrl *chartRight2;
 
416
    
 
417
    wxChartPoints *bcpLeft1, *bcpLeft2, *bcpLeft3, *bcpLeft4, *pcpRight1;
 
418
    
 
419
    bcpLeft1 = wxBarChartPoints::CreateWxBarChartPoints( 
 
420
        wxT("Ita") );
 
421
    
 
422
    bcpLeft2 = wxBarChartPoints::CreateWxBarChartPoints( 
 
423
        wxT("Fra") );
 
424
    
 
425
    bcpLeft3 = wxBarChartPoints::CreateWxBarChartPoints( 
 
426
        wxT("Ger") );
 
427
    
 
428
    bcpLeft4 = wxBarChartPoints::CreateWxBarChartPoints( 
 
429
        wxT("UK") );
 
430
    
 
431
    pcpRight1 = wxPieChartPoints::CreateWxPieChartPoints( 
 
432
        wxT("-Pie-") );
 
433
    
 
434
    bcpLeft1->Add( wxT("val3"), 2, 3 );
 
435
    bcpLeft1->Add( wxT("val1"), 5, 1 );
 
436
    bcpLeft1->Add( wxT("val4"), 8, 4);
 
437
    bcpLeft1->Add( wxT("val2"), 15, 2 );
 
438
    bcpLeft1->Add( wxT("val5"), 20, 5 );
 
439
    bcpLeft1->SetDisplayTag( XVALUE );
 
440
    
 
441
    bcpLeft2->Add( wxT("val: 4"), 2, 4 );
 
442
    bcpLeft2->Add( wxT("val: 2"), 5, 2 );
 
443
    bcpLeft2->Add( wxT("val: 2"), 8, 2);
 
444
    bcpLeft2->Add( wxT("val: 6"), 15, 6 );
 
445
    bcpLeft2->Add( wxT("val: 2"), 20, 2 );
 
446
    bcpLeft2->SetDisplayTag( NAME );
 
447
    
 
448
    bcpLeft3->Add( wxT("val3"), 2, 1 );
 
449
    bcpLeft3->Add( wxT("val1"), 5, 3 );
 
450
    bcpLeft3->Add( wxT("val4"), 8, 4);
 
451
    bcpLeft3->Add( wxT("val2"), 15, 5 );
 
452
    bcpLeft3->Add( wxT("val5"), 20, 5 );
 
453
    bcpLeft3->SetDisplayTag( XVALUE );
 
454
    
 
455
    bcpLeft4->Add( wxT("val3"), 2, 3 );
 
456
    bcpLeft4->Add( wxT("val6"), 5, 6 );
 
457
    bcpLeft4->Add( wxT("val2"), 8, 2);
 
458
    bcpLeft4->Add( wxT("val2"), 15, 2 );
 
459
    bcpLeft4->Add( wxT("val4"), 20, 4 );
 
460
    bcpLeft4->SetDisplayTag( YVALUE );
 
461
    
 
462
    pcpRight1->Add( wxT("val1"), 5, 10 );
 
463
    pcpRight1->Add( wxT("val2"), 15, 20 );
 
464
    pcpRight1->Add( wxT("val3"), 2, 5 );
 
465
    pcpRight1->Add( wxT("val4"), 8, 30);
 
466
    pcpRight1->Add( wxT("val5"), 20, 10 );
 
467
    pcpRight1->Add( wxT("val6"), 20, 15 );
 
468
    pcpRight1->Add( wxT("val7"), 20, 10 );
 
469
    pcpRight1->SetDisplayTag( NAME );
 
470
        
 
471
    wxStaticText *lblTitle4 = new wxStaticText(this, 
 
472
                                               wxID_ANY, wxT("Bar/Pie Charts"));
 
473
    chartRight2 = new wxChartCtrl( this, -1, DEFAULT_STYLE, 
 
474
                                    wxDefaultPosition, wxSize(200,200), 
 
475
                                    wxSUNKEN_BORDER  );
 
476
    
 
477
    chartRight2->Add( bcpLeft1 );
 
478
    chartRight2->Add( bcpLeft2 );
 
479
    chartRight2->Add( bcpLeft3 );
 
480
    chartRight2->Add( bcpLeft4 );
 
481
    chartRight2->Add( pcpRight1 );
 
482
    
 
483
    sizer->Add( lblTitle4, 0, wxEXPAND );
 
484
    sizer->Add( chartRight2, 1, wxEXPAND );
 
485
}
 
486
 
 
487
//+++-S-cf-------------------------------------------------------------------
 
488
//  NAME:       ResizeChart()
 
489
//  DESC:       resize chart
 
490
//  PARAMETERS: None
 
491
//  RETURN:     None
 
492
//----------------------------------------------------------------------E-+++
 
493
void MyPanel::ResizeChart()
 
494
{
 
495
        m_pChartCtrl->Resize();
 
496
}
 
497
 
 
498
//+++-S-cf-------------------------------------------------------------------
 
499
//  NAME:       WriteChart()
 
500
//  DESC:       Write chart to file
 
501
//  PARAMETERS: None
 
502
//  RETURN:     None
 
503
//----------------------------------------------------------------------E-+++
 
504
void MyPanel::WriteChart()
 
505
{
 
506
    m_pChartCtrl->WriteToFile( wxT("mem.bmp") );
 
507
}