drawing_canvas.h

Go to the documentation of this file.
00001 
00002 // Name:        drawing_canvas.h
00003 // Purpose:     
00004 // Author:      NDA
00005 // Modified by: 
00006 // Created:     10/10/2006 15:08:09
00007 // RCS-ID:      
00008 // Copyright:   CAEN S.p.A All rights reserved.
00009 // Licence:     
00011 
00012 // Generated by DialogBlocks (unregistered), 10/10/2006 15:08:09
00013 
00014 #ifndef _DRAWING_CANVAS_H_
00015 #define _DRAWING_CANVAS_H_
00016 
00017 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
00018 #pragma interface "drawing_canvas.h"
00019 #endif
00020 
00025 
00026 
00027 
00032 
00033 
00034 
00035 class DrawingPanel;
00036 
00041 
00042 #define ID_DRAWING_CANVAS_DIALOG 10026
00043 #define SYMBOL_DRAWINGCANVAS_STYLE 0
00044 #define SYMBOL_DRAWINGCANVAS_TITLE _("DrawingCanvas")
00045 #define SYMBOL_DRAWINGCANVAS_IDNAME ID_DRAWING_CANVAS_DIALOG
00046 #define SYMBOL_DRAWINGCANVAS_SIZE wxSize(400, 300)
00047 #define SYMBOL_DRAWINGCANVAS_POSITION wxDefaultPosition
00048 
00049 
00054 #ifndef wxCLOSE_BOX
00055 #define wxCLOSE_BOX 0x1000
00056 #endif
00057 
00062 class DrawingCanvas: public wxPanel
00063 {    
00064     DECLARE_DYNAMIC_CLASS( DrawingCanvas )
00065     DECLARE_EVENT_TABLE()
00066 
00067 public:
00069     DrawingCanvas( );
00070     DrawingCanvas( int scope_index, wxWindow* parent, wxWindowID id = SYMBOL_DRAWINGCANVAS_IDNAME, const wxPoint& pos = SYMBOL_DRAWINGCANVAS_POSITION, const wxSize& size = SYMBOL_DRAWINGCANVAS_SIZE, long style = SYMBOL_DRAWINGCANVAS_STYLE );
00071         ~DrawingCanvas( );
00073     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_DRAWINGCANVAS_IDNAME, const wxPoint& pos = SYMBOL_DRAWINGCANVAS_POSITION, const wxSize& size = SYMBOL_DRAWINGCANVAS_SIZE, long style = SYMBOL_DRAWINGCANVAS_STYLE );
00074 
00076     void CreateControls();
00077 
00080     void OnSize( wxSizeEvent& event );
00081 
00083     void OnPaint( wxPaintEvent& event );
00084 
00086     void OnEraseBackground( wxEraseEvent& event );
00087 
00089 
00092     wxBitmap GetBitmapResource( const wxString& name );
00093 
00095     wxIcon GetIconResource( const wxString& name );
00097 
00099     static bool ShowToolTips();
00100 
00103 public:
00104         void RefreshBackBitmap( void);
00105         void RefreshSampleBitmap( wxBitmap *p_sample_bitmap);
00106         static const int NUM_DIV_PER_SCREEN= 10;
00107 protected:
00108         void DrawGrid( wxDC &dc);
00109         void DrawBackground( wxDC &dc);
00110         void DrawCursor( wxDC &dc);
00111         void DrawTrigger( wxDC &dc);
00112         void DrawSamples( wxDC &dc);
00113 
00114         wxBitmap *m_p_back_bitmap, *m_p_buffer_bitmap;
00115         DrawingPanel *m_parent;
00116         int m_pix_X, m_pix_Y;
00117         bool m_first_time;
00118         int m_scope_index;
00119 
00120 };
00121 
00122 #endif
00123     // _DRAWING_CANVAS_H_

Generated on Mon Mar 19 17:14:07 2007 for CAENScope by  doxygen 1.4.6-NO