1 #ifndef LIBWTK_SDL2_DRAW_CONTEXT_HPP 2 #define LIBWTK_SDL2_DRAW_CONTEXT_HPP 5 #include <SDL2/SDL_rect.h> 6 #include <SDL2/SDL_surface.h> 7 #include <SDL2/SDL_render.h> 9 #include "font_manager.hpp" 10 #include "copy_command.hpp" 17 SDL_Color button_bg_color;
18 SDL_Color button_fg_color;
19 SDL_Color button_frame_color;
20 SDL_Color button_pressed_bg_color;
21 SDL_Color button_selected_bg_color;
23 SDL_Color entry_selected_bg_color;
24 SDL_Color entry_highlight_bg_color;
26 SDL_Color entry_box_bg_color;
27 SDL_Color entry_box_frame_color;
28 SDL_Color entry_box_selected_frame_color;
33 SDL_Color active_color;
35 SDL_Color hightlight_color;
134 void draw_button_box(SDL_Rect
box,
bool activated,
bool selected);
135 void draw_button_text(std::string
const & text, SDL_Rect abs_rect);
138 void draw_entry_box(SDL_Rect
box,
bool selected);
139 void draw_entry_text(std::string text, SDL_Rect abs_rect,
int texture_x_offset = 0,
int texture_y_offset = 0);
140 void draw_entry_pressed_background(SDL_Rect
box);
141 void draw_entry_active_background(SDL_Rect
box);
142 void draw_entry_hightlighted_background(SDL_Rect
box);
143 void draw_entry_position_indicator(SDL_Rect
box);
147 int draw_label_text(SDL_Rect
box, std::string text,
bool wrap,
int font_idx = 0);
149 void draw_background(SDL_Rect
box);
152 void set_color(SDL_Color c);
153 void set_color_alpha(SDL_Color c);
154 void draw_rect_filled(SDL_Rect r);
155 void draw_rect(SDL_Rect r);
156 void blit(SDL_Surface * s,
const SDL_Rect * srcrect,
const SDL_Rect * dstrect);
157 void run_copy_commands(std::vector<copy_command>
const & commands,
point origin, SDL_Color color);
158 void copy_texture(SDL_Texture * t, SDL_Rect src, SDL_Rect dst);
159 void copy_texture(SDL_Texture * t, SDL_Rect dst);
163 SDL_Renderer * _renderer;
Definition: draw_context.hpp:13
Definition: draw_context.hpp:126
Definition: geometry.hpp:6
Definition: font_manager.hpp:13