display_image_frame.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) Massimo Cora' 2006 <maxcvs@gmail.com>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 #ifndef _DISPLAY_IMAGE_FRAME_H_
00020 #define _DISPLAY_IMAGE_FRAME_H_
00021 
00022 #if defined(__GNUG__) && !defined(__APPLE__)
00023 #pragma interface "display_image_frame.cpp"
00024 #endif
00025 
00026 
00027 #include <cv.h>
00028 #include <highgui.h>
00029 
00030 #include "display_canvas.h"
00031 
00036 
00037 #include "wx/frame.h"
00039 
00044 
00045 
00046 
00051 
00052 #define ID_DISPLAY_FRAME 10046
00053 #define SYMBOL_DISPLAYIMAGEFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00054 #define SYMBOL_DISPLAYIMAGEFRAME_TITLE _("Display Image Frame")
00055 #define SYMBOL_DISPLAYIMAGEFRAME_IDNAME ID_DISPLAY_FRAME
00056 #define SYMBOL_DISPLAYIMAGEFRAME_SIZE wxSize(400, 300)
00057 #define SYMBOL_DISPLAYIMAGEFRAME_POSITION wxDefaultPosition
00058 #define ID_PANEL 10047
00060 
00061 
00065 #ifndef wxCLOSE_BOX
00066 #define wxCLOSE_BOX 0x1000
00067 #endif
00068 #ifndef wxFIXED_MINSIZE
00069 #define wxFIXED_MINSIZE 0
00070 #endif
00071 
00076 class DisplayImageFrame: public wxFrame
00077 {    
00078     DECLARE_CLASS( DisplayImageFrame )
00079     DECLARE_EVENT_TABLE()
00080 
00081 public:
00083     DisplayImageFrame( );
00084         virtual ~DisplayImageFrame( );
00085     DisplayImageFrame( wxWindow* parent, 
00086                                                 int stream_id, 
00087                                                 const wxSize& size = SYMBOL_DISPLAYIMAGEFRAME_SIZE, 
00088                                                 wxWindowID id = SYMBOL_DISPLAYIMAGEFRAME_IDNAME, 
00089                                                 const wxString& caption = SYMBOL_DISPLAYIMAGEFRAME_TITLE,
00090                                                 const wxPoint& pos = SYMBOL_DISPLAYIMAGEFRAME_POSITION, 
00091                                                 long style = SYMBOL_DISPLAYIMAGEFRAME_STYLE );
00092 
00093     bool Create( wxWindow* parent, 
00094                 wxWindowID id = SYMBOL_DISPLAYIMAGEFRAME_IDNAME, 
00095                 const wxString& caption = SYMBOL_DISPLAYIMAGEFRAME_TITLE,
00096                 const wxPoint& pos = SYMBOL_DISPLAYIMAGEFRAME_POSITION, 
00097                 const wxSize& size = SYMBOL_DISPLAYIMAGEFRAME_SIZE, 
00098                 long style = SYMBOL_DISPLAYIMAGEFRAME_STYLE );
00099 
00101     void CreateControls();
00102 
00104 
00106     void OnCloseWindow( wxCloseEvent& event );
00107 
00109 
00111 
00113     wxBitmap GetBitmapResource( const wxString& name );
00114 
00116     wxIcon GetIconResource( const wxString& name );
00118 
00120     static bool ShowToolTips();
00121 
00124 
00125 
00126         void DisplayIplImage( IplImage *image );
00127 
00128 private:        // data
00129         DisplayCanvas *_display_canvas;
00130         bool _can_display;
00131         int _window_width;
00132         int _window_height;
00133         int _stream_id;
00134         wxPanel* itemPanel2;
00135 };
00136 
00137 #endif
00138     // _DISPLAY_IMAGE_FRAME_H_

Generated on Tue Dec 26 10:32:38 2006 for Omnimeeting by  doxygen 1.4.7