Página principal | Jerarquía de la clase | Lista alfabética | Lista de componentes | Lista de archivos | Miembros de las clases | Archivos de los miembros | Páginas relacionadas

_wxwindows.h

Ir a la documentación de este archivo.
00001 //===========================================================================
00002 //= _wxwindows.h                                               Mayo de 2002 =
00003 //=-------------------------------------------------------------------------=
00004 //= Definicion de elementos GUI especificos a WXWINDOWS                     =
00005 //=-------------------------------------------------------------------------=
00006 //= ADVERTENCIA: ESTE SOFTWARE NO ESTA CONCEBIDO NI DISENNADO PARA EL USO   =
00007 //= EN EQUIPO DE CONTROL EN LINEA EN ENTORNOS PELIGROSOS QUE REQUIERAN UN   =
00008 //= DESEMPENNO LIBRE DE FALLAS, COMO LA OPERACION DE PLANTAS NUCLEARES,     = 
00009 //= SISTEMAS DE NAVEGACION O COMUNICACION EN AVIONES, TRAFICO AEREO,        =
00010 //= EQUIPO MEDICO DEL CUAL DEPENDAN VIDAS HUMANAS O SISTEMAS DE ARMAMENTO,  =
00011 //= EN LOS CUALES UNA FALLA EN EL SOFTWARE PUEDA IMPLICAR DIRECTAMENTE LA   =
00012 //= MUERTE, DANNOS PERSONALES O DANNOS FISICOS Y/O AMBIENTALES GRAVES       =
00013 //= ("ACTIVIDADES DE ALGO RIESGO").                                         =
00014 //=-------------------------------------------------------------------------=
00015 //= Autor original: Oscar J. Chavarro G.  A.K.A. JEDILINK. Copyright (c),   =
00016 //= 1997 - 2003, oscarchavarro@hotmail.com                                  =
00017 //= AQUYNZA es software libre, y se rige bajo los terminos de la licencia   =
00018 //= LGPL de GNU (http://www.gnu.org). Para mayor informacion respecto a la  =
00019 //= licencia de uso, consulte el archivo ./doc/LICENCIA en la distribucion. =
00020 //===========================================================================
00021 
00022 #ifndef __WXWINDOWSGUI__
00023 #define __WXWINDOWSGUI__
00024 
00025 #include "jed_defs.h"
00026 #include "framework/gui/jed_gui.h"
00027 #include "lista.h"
00028 
00029 #ifdef WXWINDOWS_ENABLED
00030 
00031   #ifdef _STRING_H
00032     #undef _STRING_H
00033     #include <wx/wx.h>
00034     #define _STRING_H
00035   #endif
00036   #ifndef _STRING_H
00037     #include <wx/wx.h>
00038   #endif
00039   #include <wx/timer.h>
00040   #include <wx/log.h>
00041 
00042   #if !wxUSE_GLCANVAS
00043     #error WXWINDOWS INSTALLATION ERROR - Please activate wxUSE_GLCANVAS
00044   #endif
00045   #include <wx/glcanvas.h>
00046   #include <wx/notebook.h>
00047 
00048 //- Clases utilitarias particulares del framework WXWINDOWS -----------------
00049 
00050 class JED_WXWINDOWS_GUI;
00051 class _WXWINDOWS_GLWIDGET;
00052 class _WXWINDOWS_APLICACION;
00053 
00054 class _WXWINDOWS_NOTEBOOK : public wxNotebook
00055 {
00056   public:
00057     _WXWINDOWS_NOTEBOOK(wxWindow *parent, wxWindowID id = -1,
00058         const wxPoint& pos = wxDefaultPosition,
00059         const wxSize& size = wxDefaultSize, long style = 0);
00060     wxPanel *crear_pagina(void);
00061 };
00062 
00063 class _WXWINDOWS_WINDOW: public wxFrame
00064 {
00065     DECLARE_EVENT_TABLE();
00066 
00067   private:
00068     wxTimer tick_timer;
00069     int _id;
00070     _WXWINDOWS_GLWIDGET *drawing_area;
00071     wxPanel *panel;
00072     wxSizer *panel_sizer;
00073     _WXWINDOWS_NOTEBOOK *area2;
00074 
00075   public:
00076     _WXWINDOWS_WINDOW(wxFrame *frame, const wxString& title, const wxPoint& pos,
00077             const wxSize& size, long style = wxDEFAULT_FRAME_STYLE);
00078 
00079     void OnExit(wxCommandEvent& event);
00080     void OnNewWindow(wxCommandEvent& event);
00081     void OnTimer(wxTimerEvent& event);
00082     void OnMenu(wxCommandEvent& event);
00083     wxPanel *crear_area_adicional(void);
00084 
00085     friend class _WXWINDOWS_APLICACION;
00086 };
00087 
00088 class _WXWINDOWS_GLWIDGET: public wxGLCanvas
00089 {
00090     DECLARE_EVENT_TABLE();
00091 
00092   private:
00093     int id_vista;
00094 
00095   public:
00096     _WXWINDOWS_GLWIDGET(wxWindow *parent, const wxWindowID id = -1, 
00097                  const wxPoint& pos = wxDefaultPosition, 
00098                  const wxSize& size = wxDefaultSize,
00099                  long style = 0, const wxString& name = "AQUYNZA_APPLICATION");
00100     _WXWINDOWS_GLWIDGET(wxWindow *parent, const _WXWINDOWS_GLWIDGET &other,
00101                  const wxWindowID id = -1, 
00102                  const wxPoint& pos = wxDefaultPosition,
00103                  const wxSize& size = wxDefaultSize, long style = 0,
00104                  const wxString& name = "AQUYNZA_APPLICATION" );
00105    
00106     ~_WXWINDOWS_GLWIDGET(void);
00107 
00108     void OnPaint(wxPaintEvent& event);
00109     void OnSize(wxSizeEvent& event);
00110     void OnChar(wxKeyEvent& event);
00111     void OnKeyDown(wxKeyEvent& event);
00112     void OnKeyUp(wxKeyEvent& event);
00113     void OnEnterWindow(wxMouseEvent& event);
00114     void OnMotion(wxMouseEvent& event);
00115     void OnButton(wxMouseEvent& event);
00116     void OnEraseBackground(wxEraseEvent& event);
00117 
00118     friend class _WXWINDOWS_WINDOW;
00119 };
00120 //---------------------------------------------------------------------------
00121 
00122 #endif // WXWINDOWS_ENABLED
00123 
00124 class JED_WXWINDOWS_INTERFACE : public JED_INTERFACE {
00125   private:
00126     int _xtam;
00127     int _ytam;
00128     char *_nombre;
00129     int *_Argc;
00130     char **_ARgv;
00131 
00132     LISTA <CONTROL_GUI *> *Controles_pendientes;
00133     REPOSITORIO_DE_ENTIDADES *Repositorio_pendiente;
00134 
00135 //    void crear_ventana_wxwindows(void);
00136 
00137   public:
00138     JED_WXWINDOWS_INTERFACE();
00139     virtual ~JED_WXWINDOWS_INTERFACE();
00140 
00141     BOOLEAN crear(int *Argc, char *argv[], 
00142         int x_tam = 320, int y_tam = 200, char *nombre = "AQUYNZA");
00143     void finalizar(void);
00144     void ejecutar(void);
00145 #ifdef WXWINDOWS_ENABLED
00146     void solicitar_nueva_ventana(void);
00147 #endif
00148     void solicitar_repintado(void);
00149     void set_draw_callback( void (*p)(int context_id) );
00150     void set_tick_callback( int (*p)(int context_id) );
00151     void set_ejecutor( int (*p)(int idc, int context_id) );
00152     void set_mouse_callback( int (*p)(EVENTO_GUI *e, int context_id) );
00153     void set_keyboard_callback( int (*p)(EVENTO_GUI *e, int context_id) );
00154     void set_resize_callback(void (*p)(int x_tam, int y_tam, int context_id));
00155     void set_multiview_callback
00156         ( void (*p)(int operacion, int id_vista, char *detalles,
00157                     char *menu, char *botonera) );
00158     BOOLEAN
00159     anexar_controles(LISTA <CONTROL_GUI *> *Controles, 
00160                      REPOSITORIO_DE_ENTIDADES *Repositorio);
00161 #ifdef WXWINDOWS_ENABLED
00162     friend class _WXWINDOWS_APLICACION;
00163 #endif
00164 };
00165 
00166 #ifdef WXWINDOWS_ENABLED
00167 class _WXWINDOWS_APLICACION : public wxApp
00168 {
00169   private:
00170     JED_WXWINDOWS_INTERFACE *_Gui;
00171   public:
00172     bool OnInit(void);
00173     void set_gui(JED_WXWINDOWS_INTERFACE *Gui);
00174 };
00175 #endif
00176 
00177 #endif // __WXWINDOWSGUI__
00178 
00179 //===========================================================================
00180 //= EOF                                                                     =
00181 //===========================================================================
00182 

Este archivo HTML ha sido generado automáticamente a partir del código fuente AQUYNZA. NO LO EDITE. Para mayor información contacte al autor.