20 #ifndef _MFORMS_DRAWBOX_H_
21 #define _MFORMS_DRAWBOX_H_
25 #include <base/geometry.h>
27 #include "cairo/cairo.h"
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 struct DrawBoxImplPtrs
37 bool (*create)(DrawBox *);
38 void (*set_needs_repaint)(DrawBox *);
39 void (*set_needs_repaint_area)(DrawBox *, int, int, int, int);
40 void (*add)(DrawBox *, View *,
Alignment alignment);
41 void (*
remove)(DrawBox *, View *);
42 void (*move)(DrawBox *, View *,
int x,
int y);
64 virtual ~Accessible() {};
68 virtual std::string get_acc_name() = 0;
69 virtual Role get_acc_role() = 0;
73 virtual std::string get_acc_description() {
return ""; }
74 virtual std::string get_acc_value() {
return ""; }
76 virtual int get_acc_child_count() {
return 0; }
77 virtual Accessible* get_acc_child(
int index) {
return NULL; }
79 virtual base::Rect get_acc_bounds() {
return base::Rect(); }
80 virtual Accessible* hit_test(
int x,
int y) {
return NULL; }
82 virtual std::string get_acc_default_action() {
return ""; }
83 virtual void do_default_action() {};
98 void remove(
View *view);
101 void move(
View *child,
int x,
int y);
103 virtual void set_layout_dirty(
bool value);
104 void set_padding(
int left,
int top,
int right,
int bottom);
106 void set_needs_repaint();
107 void set_needs_repaint_area(
int x,
int y,
int w,
int h);
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 virtual void get_layout_size(
int* w,
int* h);
112 virtual void repaint(cairo_t *cr,
int x,
int y,
int w,
int h) {}
113 virtual void cancel_operation() {};
115 virtual std::string get_acc_name() {
return get_name(); }
116 virtual base::Rect get_acc_bounds(){
return base::Rect(get_x(), get_y(), get_width(), get_height());}
117 virtual Role get_acc_role() {
return mforms::Accessible::None; }