Subversion Repositories gelsvn

Rev

Rev 630 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 630 Rev 647
Line 23... Line 23...
23
#include <memory> //unique_ptr
23
#include <memory> //unique_ptr
24
#include <vector>
24
#include <vector>
25
#include <cassert>
25
#include <cassert>
26
 
26
 
27
namespace GLGraphics {
27
namespace GLGraphics {
-
 
28
    
-
 
29
    
-
 
30
    
28
 
31
 
29
class Console
32
class Console
30
{
33
{
31
public:
34
public:
32
    Console();
35
    Console();
33
    ~Console() throw();
36
    ~Console() throw();
34
 
37
 
35
    //GLUT functions
38
    // keyboard and display
36
    void display();
39
    void display(int scaling=1);
37
    void keyboard(unsigned char key);
40
    void keyboard(unsigned char key);
38
    void special(int key);
41
    void key_left();
-
 
42
    void key_right();
-
 
43
    void key_home();
-
 
44
    void key_end();
-
 
45
    void key_up();
-
 
46
    void key_down();
39
 
47
 
40
    //stdio-like io
48
    //stdio-like io
41
    void print(const char* buffer);
49
    void print(const char* buffer);
42
    void printf(const char* format, ...);
50
    void printf(const char* format, ...);
43
    void newline();
51
    void newline();
Line 267... Line 275...
267
    void clear_history();
275
    void clear_history();
268
 
276
 
269
    enum { any_arity = 0xFFFF };
277
    enum { any_arity = 0xFFFF };
270
 
278
 
271
    //draw commands
279
    //draw commands
272
    void draw_text(int x, int y,
280
    void draw_text(int scale, int x, int y,
273
                   float r, float g, float b,
281
                   float r, float g, float b,
274
                   const char* buffer);
282
                   const char* buffer);
275
 
283
 
276
    void draw_textf(int x, int y,
284
    void draw_textf(int scale, int x, int y,
277
                    float r, float g, float b,
285
                    float r, float g, float b,
278
                    const char* fmt, ...);
286
                    const char* fmt, ...);
279
    //state
287
    //state
280
    command_map_t m_commands;
288
    command_map_t m_commands;
281
    std::vector<std::string> m_buffer;
289
    std::vector<std::string> m_buffer;