1 #if !defined(_BTKIMPL_WINDOW_HPP_) 2 #define _BTKIMPL_WINDOW_HPP_ 9 #include "../signal/signal.hpp" 10 #include "../widget.hpp" 11 #include "../themes.hpp" 12 #include "../event.hpp" 13 #include "../font.hpp" 27 bool (*draw_fn)(Renderer &,
Widget *widget,
void*);
35 bool call(Renderer &render)
const{
36 return draw_fn(render,widget,userdata);
41 WindowImpl(
const char *title,
int x,
int y,
int w,
int h,
int flags);
44 void pixels_size(
int *x,
int *y);
48 void on_resize(
int new_w,
int new_h);
49 void on_dropfile(std::string_view file);
51 void handle_windowev(
const SDL_Event &event);
53 bool dispatch(
Event &event);
56 void update_postion();
57 SDL_Window *win =
nullptr;
69 SDL_Cursor *cursor =
nullptr;
71 std::recursive_mutex mtx;
74 Uint32 last_draw_ticks = 0;
80 std::list<DrawCallback> draw_cbs;
94 #endif // _BTKIMPL_WINDOW_HPP_
This header include many useful containers.
Definition: async.hpp:7
The Internal Window Draw Callback.
Definition: window.hpp:24
bool call(Renderer &render) const
Start Render.
Definition: window.hpp:35
Font Class.
Definition: font.hpp:26
Color structure.
Definition: pixels.hpp:19
Font font() const
Get window's font.
Definition: window.hpp:88
A base event of all events.
Definition: event.hpp:17
Definition: window.hpp:39
A Container of Widget.
Definition: widget.hpp:108