Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members Related Pages

# OpenGLGUIDrawInterfaceC.h

    00001 #ifndef __OPENGLGUIDRAWINTERFACEC_H__
    00002 #define __OPENGLGUIDRAWINTERFACEC_H__
    00003
    00004 #define WIN32_LEAN_AND_MEAN
    00005 #include <windows.h>
    00006 #include <gl\gl.h>
    00007
    00008 // forw declaration
    00009 namespace PajaSystem {
    00010     class OpenGLGUIDrawInterfaceC;
    00011 };
    00012
    00013 #include "PajaTypes.h"
    00014 #include "BBox2C.h"
    00015 #include "ColorC.h"
    00016 #include "Vector2C.h"
    00017 #include "DeviceInterfaceI.h"
    00018 #include "GUIDrawInterfaceI.h"
    00019 #include "OpenGLViewportC.h"
    00020 #include "OpenGLDeviceC.h"
    00021
    00022
    00023 namespace PajaSystem {
    00024
    00026     const PluginClass::ClassIdC CLASS_OPENGL_GUIINTERFACE = PluginClass::ClassIdC( 0, 10002 );
    00027
    00028
    00029     class OpenGLGUIDrawInterfaceC : public GUIDrawInterfaceI
    00030     {
    00031     public:
    00032
    00033         virtual Edit::DataBlockI*               create();
    00034         static OpenGLGUIDrawInterfaceC*         create_new( OpenGLDeviceC* pDevice );
    00035         virtual PluginClass::ClassIdC           get_class_id() const;
    00036         virtual const char*                     get_class_name();
    00037
    00038         // draws the layout
    00039         virtual void    draw_layout( const PajaTypes::ColorC& rLayout );
    00040
    00041         virtual void    begin_layout();
    00042         virtual void    end_layout();
    00043
    00044         // Uses specified font.
    00045         virtual void    use_font( HFONT hFont );
    00046         // Draws text using current font.
    00047         virtual void    draw_text( const PajaTypes::Vector2C& rPos, const char* szText );
    00048
    00049         // Sets current draw color.
    00050         virtual void    set_color( const PajaTypes::ColorC& rColor );
    00051         // Sets current point size.
    00052         virtual void    set_point_size( PajaTypes::float32 f32Size );
    00053         // Draws a line.
    00054         virtual void    draw_line( const PajaTypes::Vector2C& rFrom, const PajaTypes::Vector2C& rTo );
    00055         // Draws a line.
    00056         virtual void    draw_point( const PajaTypes::Vector2C& rPos );
    00057         // Draws grid to based on latest draw layout call and grid size.
    00058         virtual void    draw_grid( PajaTypes::float32 f32Width, PajaTypes::float32 f32Height, PajaTypes::float32 f32GridSize );
    00059         // Draws selection box.
    00060         virtual void    draw_selection_box( const PajaTypes::Vector2C& rMin, const PajaTypes::Vector2C& rMax );
    00061         // Draw a box.
    00062         virtual void    draw_box( const PajaTypes::Vector2C& rMin, const PajaTypes::Vector2C& rMax );
    00063         // Draws a marker.
    00064         virtual void    draw_marker( const PajaTypes::Vector2C& rPos, PajaTypes::float32 f32Size );
    00065
    00066     protected:
    00067         OpenGLGUIDrawInterfaceC();
    00068         OpenGLGUIDrawInterfaceC( OpenGLDeviceC* pDevice );
    00069         virtual ~OpenGLGUIDrawInterfaceC();
    00070
    00071     private:
    00072         OpenGLDeviceC*      m_pDevice;
    00073         DWORD               m_dwFontListStart;
    00074
    00075     };
    00076
    00077 };  // namespace
    00078
    00079 #endif