block_panel.h 976 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __BLOCK_PANEL_H__
  2. #define __BLOCK_PANEL_H__
  3. #include <rtgui/widgets/panel.h>
  4. DECLARE_CLASS_TYPE(block_panel);
  5. /** Gets the type of a block panel */
  6. #define BLOCK_PANEL_TYPE (RTGUI_TYPE(block_panel))
  7. /** Casts the object to an block panel */
  8. #define BLOCK_PANEL(obj) (RTGUI_OBJECT_CAST((obj), BLOCK_PANEL_TYPE, block_panel_t))
  9. /** Checks if the object is an block panel */
  10. #define RTGUI_IS_BLOCK_PANEL(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), BLOCK_PANEL_TYPE))
  11. /*
  12. * the block panel widget
  13. */
  14. struct block_panel
  15. {
  16. struct rtgui_panel parent;
  17. int angle_y;
  18. };
  19. typedef struct block_panel block_panel_t;
  20. struct block_panel *block_panel_create(int angle_y, struct rtgui_rect *rect);
  21. void block_panel_destroy(block_panel_t* panel);
  22. rt_bool_t block_panel_event_handler(struct rtgui_object *object, struct rtgui_event* event);
  23. void block_panel_get_client_extent(struct block_panel *panel, struct rtgui_rect *rect);
  24. #endif