Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Widget class to display one or several curves. Manages grid display, curve and points creation and events. More...
Public Types | |
enum | GraphState { GRAPH_STATE_ITEM_MOVE = 1, GRAPH_STATE_GRAPH_PAN = 2, GRAPH_STATE_MULTISELECTION_SQUARE = 4, GRAPH_STATE_TANGENT_MOVE = 8, GRAPH_STATE_TIMELINE_MOVE = 16, GRAPH_STATE_GIZMO_MOVE = 32, GRAPH_STATE_PROCESS_CANCELLED = 64, GRAPH_STATE_COUNT } |
![]() | |
enum | TextEllipsis { TEXT_ELLIPSIS_LEFT, TEXT_ELLIPSIS_RIGHT, TEXT_ELLIPSIS_BOTH = TEXT_ELLIPSIS_LEFT | TEXT_ELLIPSIS_RIGHT, TEXT_ELLIPSIS_COUNT } |
![]() | |
enum | Roundness { ROUNDNESS_NONE = 0, ROUNDNESS_TOP_LEFT = 1, ROUNDNESS_TOP_RIGHT = 2, ROUNDNESS_BOTTOM_LEFT = 4, ROUNDNESS_BOTTOM_RIGHT = 8, ROUNDNESS_LEFT = ROUNDNESS_TOP_LEFT | ROUNDNESS_BOTTOM_LEFT, ROUNDNESS_RIGHT = ROUNDNESS_TOP_RIGHT | ROUNDNESS_BOTTOM_RIGHT, ROUNDNESS_TOP = ROUNDNESS_TOP_LEFT | ROUNDNESS_TOP_RIGHT, ROUNDNESS_BOTTOM = ROUNDNESS_BOTTOM_LEFT | ROUNDNESS_BOTTOM_RIGHT, ROUNDNESS_ALL = ROUNDNESS_TOP | ROUNDNESS_BOTTOM } |
enum | Constraint { CONSTRAINT_LEFT, CONSTRAINT_RIGHT, CONSTRAINT_TOP, CONSTRAINT_BOTTOM, CONSTRAINT_COUNT } |
enum | Justify { JUSTIFY_LEFT, JUSTIFY_RIGHT, JUSTIFY_CENTER, JUSTIFY_COUNT } |
enum | IconPosition { ICON_POSITION_LEFT, ICON_POSITION_RIGHT, ICON_POSITION_COUNT } |
![]() | |
typedef void(* | EventInfoFunction )(EventObject &, const EventInfo &, void *) |
event callback signature for free functions / static methods. | |
typedef void(EventObject::* | EventInfoMethod )(EventObject &, const EventInfo &, void *) |
event callback signature for methods. | |
typedef void(* | EventFunction )(EventObject &, const CoreString &, void *) |
typedef void(EventObject::* | EventMethod )(EventObject &, const CoreString &, void *) |
Public Member Functions | |
bool | is_inside (int x, int y, int l, int r, int b, int t) |
GuiGraphWidget (GuiWidget &parent, const int &x, const int &y, const int &w, const int &h) | |
Constructor. | |
virtual void | load_settings (const ParserGroup &settings) override |
virtual void | save_settings (ParserGroup &settings) override |
virtual void | resize (const int &x, const int &y, const int &w, const int &h) override |
void | update_animable_panel () |
virtual void | draw (GuiDc &dc) override |
This is the main drawing method of the widget. | |
virtual void | debug_draw (GuiDc &dc, int y) |
virtual void | draw_select (GuiDc &dc) |
virtual void | draw_tool (GuiDc &dc, bool pick) |
void | pick_objects (GuiDc &dc, int mouse_x, int mouse_y) |
Check for objects under the given mouse coordinates. | |
CoreString | double_to_string (const double &value, int max_precision=2) |
Converts double value to string, with specified precision. | |
void | add_select_item (GuiGraphItem &item, GMathVec3uc &picking_color) |
register an item to be selectable and generate a unique color for it. | |
GuiGraphItem * | get_select_item (const GMathVec3uc &color) |
void | remove_select_item (const GMathVec3uc &picking_color) |
const GMathVec2d & | get_cell_current_size_px () const |
const GMathVec2d & | get_first_cell_value () const |
const GMathVec2d & | get_graph_zoom_level () const |
const GMathVec2d & | get_graph_offset () const |
const GMathVec2d & | get_graph_cell_step () const |
const int & | get_mouse_x () const |
const int & | get_mouse_y () const |
const int & | get_previous_mouse_x () const |
const int & | get_previous_mouse_y () const |
double | get_pixel_width () const |
const bool & | get_is_dirty () |
void | set_is_dirty (const bool &value) |
virtual void | update_content () |
void | get_value_with_unit (double value, CoreString &text) |
const CoreSet< GuiGraphCurve * > & | get_curves () const |
void | add_curve (GuiGraphCurve &curve) |
void | remove_curve (GuiGraphCurve &curve) |
Removes and delete incoming curve from graph. | |
virtual void | manage_fit (bool ignore_selected_keys=false)=0 |
const GMathVec3uc & | get_selectee_color () const |
void | set_highlight_tooltip (bool enable) |
bool | is_highlight_tooltip () const |
![]() | |
GuiGlWidget (GuiWidget &parent, const int &x, const int &y, const int &w, const int &h) | |
Constructor. | |
virtual void | show () override |
virtual void | hide () override |
virtual const GMathVec2i & | get_size () const override |
virtual const GMathVec2i & | get_position () const override |
int | get_view_x () const |
int | get_view_y () const |
void | make_current () |
void | swap_buffers () |
const bool & | is_drawing () const |
int | get_text_width (const CoreString &text) |
int | get_text_width (const char *text, const int &i_size) |
int | get_text_height () const |
void | draw_text (const int &x, const int &y, const int &r, const int &g, const int &b, const Justify &hj, const Justify &vj, const CoreString *text) |
void | draw_framed_text (const int &x, const int &y, const int &r, const int &g, const int &b, const int &bg_r, const int &bg_g, const int &bg_b, const Justify &hj, const Justify &vj, const CoreString *text) |
const bool & | is_overlay_visible () const |
void | show_overlay (const bool &state) |
![]() | |
GuiWidget (GuiWidget &parent, const int &x, const int &y, const int &w, const int &h) | |
GuiWidget (GuiApp &app, const int &x, const int &y, const int &w, const int &h) | |
void | destroy () |
virtual bool | is_shown () const |
bool | is_hidden () const |
bool | is_recursive_destroyed () const |
const bool & | is_destroyed () const |
virtual GuiWidget * | get_parent () const |
const GuiWindow * | get_root_window () const |
virtual void | set_parent (GuiWidget *parent) |
GuiWindow * | get_window () const |
const int & | get_width () const |
const int & | get_height () const |
const int & | get_x () const |
const int & | get_y () const |
void | set_width (int width) |
void | set_height (int height) |
void | set_size (int x, int y, int w, int h) |
void | set_position (const int &x, const int &y, bool origin=true) |
sets position , leave size unchanged. | |
void | set_mouse_cursor (const Gui::MouseCursorId &cursor) |
const Gui::MouseCursorId & | get_mouse_cursor () const |
void | set_font (const GuiFont &font) |
GuiFont & | get_font () const |
const CoreString & | get_tooltip () const |
virtual void | set_tooltip (const CoreString &tooltip) |
void | force_tooltip () |
virtual bool | is_enabled () const |
virtual void | enable () |
Activate the widget. | |
virtual void | disable () |
Deativate the widget. | |
bool | is_active () const |
Get the active state of the widget, without taking the parents into account. | |
void | set_enable (bool enable) |
Set the active state of this widget. | |
virtual GuiColorScheme & | get_color_scheme () const |
void | set_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role, const unsigned char &r, const unsigned char &g, const unsigned char &b) |
void | set_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role, const GMathVec3uc &color) |
void | get_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role, unsigned char &r, unsigned char &g, unsigned char &b) const |
const GMathVec3uc & | get_color (const GuiColorScheme::Group &group, const GuiColorScheme::Role &role) const |
GMathVec3uc | get_highlighted_color (const GMathVec3uc &, const float &factor=1.2f, const bool &keep_max_gap=true) const |
bool | is_entered () const |
virtual void | set_focus () |
bool | children_has_focus (GuiWidget *widget) const |
bool | has_focus () const |
void | lose_focus () |
bool | is_focus_receiver () const |
void | set_focus_receiver (const bool &receiver) |
bool | is_key_receiver () const |
void | set_key_receiver (const bool &receiver) |
virtual void | redraw () |
This will ask the widget to be drawn again. | |
virtual CtxDraw * | get_draw_ctx () const |
Return the drawing context needed by ModuleTool to draw in the widget. | |
virtual void | widget_update () |
This method is called just before draw() if set_is_dirty() has been called before. | |
void | set_is_dirty (const bool &value=true) |
bool | get_is_dirty () |
returns if widget is dirty or not. | |
void | compute_children_bbox (GMathVec2i &lo, GMathVec2i &hi) const |
const CoreVector< GuiWidget * > & | get_children () const |
GuiApp & | get_application () const |
GuiAction * | register_action (const CoreString &name, GuiAction::Function function, const CoreString &shortcut, const CoreString &tooltip="", void *data=0, const GuiImage *icon=0) |
const CoreVector< GuiAction * > & | get_actions () const |
GuiAction * | get_action (const CoreString &name) const |
void | get_actions_recursively (CoreVector< GuiAction * > &actions) const |
void | remove_action (GuiAction *action, bool delete_it) |
void | remove_all_actions () |
void | register_hotkey (const CoreString &shortcut, const CoreString &tooltip) |
const CoreVector< Hotkey > & | get_hotkeys () const |
void | get_hotkeys_recursively (CoreVector< Hotkey > &hotkeys) const |
const int & | get_top_offset () const |
const int & | get_bottom_offset () const |
const int & | get_left_offset () const |
const int & | get_right_offset () const |
const Constraint & | get_top_constraint () const |
const Constraint & | get_bottom_constraint () const |
const Constraint & | get_left_constraint () const |
const Constraint & | get_right_constraint () const |
virtual void | set_constraints (const Constraint &left, const Constraint &top, const Constraint &right, const Constraint &bottom) |
void | set_active_constraints (const bool &active) |
virtual const bool & | is_active_constraints () const |
void | set_recursive_constraints (const bool &recursive) |
virtual const bool & | is_recursive_constraints () const |
void | disable_clipping () |
void | enable_clipping () |
void | get_clip_region (int &x, int &y, int &w, int &h) const |
virtual void | set_clip_region (const int &x, const int &y, const int &w, const int &h) |
const bool & | is_clipping_enabled () const |
void | bring_to_front () |
void | enable_tab_navigation (const bool &enable) |
const bool & | is_tab_navigation_enabled () const |
virtual bool | is_visible () const |
virtual void | paste (const CoreString &clipboard) |
bool | initiate_dnd_event (const CoreVector< CoreBaseObject * > &data) |
Initiate Drag'n drop event. | |
bool | initiate_dnd_event (CoreVector< OfHandle > &data) |
bool | initiate_dnd_event (CoreBaseObject *data) |
See initiate_dnd_event. | |
bool | initiate_dnd_event (OfHandle data) |
virtual GuiWidget * | get_next_focus_widget () const |
virtual GuiWidget * | get_previous_focus_widget () const |
void | give_focus_to_next_widget () |
void | give_focus_to_previous_widget () |
void | get_parent_effective_clip_region (int &x, int &y, int &w, int &h) const |
const bool & | is_widget_visible (GuiWidget &child) const |
const bool & | is_show_children () const |
void | set_show_children (const bool &show_children) |
template<class WidgetType > | |
WidgetType * | get_parent_widget () const |
Return the first occurence of WidgetType* in the widget parent hierarchy, or 0 if not found. | |
virtual size_t | get_memory_size () const override |
![]() | |
EventObject () | |
Constructor. | |
EventObject (const EventObject &src) | |
Copy Constructor. | |
virtual | ~EventObject () override |
Destructor. | |
void | connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0) |
Connects this to an object to listen to a specific event. | |
void | connect (EventObject &sender, EventInfoMethod event_cb, void *data=0) |
Connects this to an object to listen any of its events. | |
bool | disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0) |
bool | disconnect_all (EventObject &sender) |
Disconnects from all objects sender was listening on. | |
void | disconnect_all () |
Disconnects from all objects we were listening on. | |
void | remove_all_connection () |
Disconnects object from other objects it is listening to, and also disconnects all objects listening to it. | |
void | raise_event (const CoreString &event_id) const |
sends an event | |
void | raise_event (const EventInfo &event_info) const |
sends an event | |
bool | is_connected (EventObject &sender, const CoreString &event_id, void *data) |
void | set_mute (const bool &mute) |
Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0. | |
bool | is_mute () const |
Returns if object is muted. | |
CoreArray< EventObject * > | get_senders () const |
unsigned int | get_sender_count () const |
unsigned int | get_receiver_count () const |
void | connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0) |
Connects this to an object to listen to a specific event. | |
void | connect (EventObject &sender, EventMethod event_cb, void *data=0) |
Connects this to an object to listen any of its events. | |
bool | disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0) |
Disconnects this from an object for a specific event. | |
![]() | |
CoreCustomData (const CoreCustomData &src) | |
void | add_custom_data (void *key, const bool &data) |
void | add_custom_data (void *key, const int &data) |
void | add_custom_data (void *key, const unsigned int &data) |
void | add_custom_data (void *key, const char *data) |
void | add_custom_data (void *key, const CoreString &data) |
void | add_custom_data (void *key, const double &data) |
void | add_custom_data (void *key, void *data) |
void | remove_custom_data (void *key) |
void | remove_all_custom_data () |
void | set_custom_data (void *key, const bool &data) |
void | set_custom_data (void *key, const int &data) |
void | set_custom_data (void *key, const unsigned int &data) |
void | set_custom_data (void *key, const double &data) |
void | set_custom_data (void *key, const char *data) |
void | set_custom_data (void *key, const CoreString &data) |
void | set_custom_data (void *key, void *data) |
void | get_custom_data (void *key, bool &data) const |
void | get_custom_data (void *key, int &data) const |
void | get_custom_data (void *key, unsigned int &data) const |
void | get_custom_data (void *key, double &data) const |
void | get_custom_data (void *key, CoreString &data) const |
void | get_custom_data (void *key, void *&data) const |
![]() | |
bool | is_kindof (const CoreBaseObject &object) const |
CoreString | get_class_info_name () const |
const unsigned long & | get_class_info_id () const |
virtual bool | is_kindof (const CoreClassInfo &cinfo) const |
virtual const CoreClassInfo & | get_class_info () const |
template<class T > | |
T * | cast () |
template<class T > | |
const T * | cast () const |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Static Public Member Functions | |
static CoreString | get_graph_state_name (const GraphState &state) |
![]() | |
static CoreString | get_text_ellipsis_name () |
static unsigned int & | get_gl_list_count () |
static void | inc_gl_list_count (const unsigned int &count) |
static void | dec_gl_list_count (const unsigned int &count) |
static int | get_opengl_major_version_number () |
Get OpenGL major version number. | |
static int | get_opengl_minor_version_number () |
Get OpenGL minor version number. | |
static float | get_opengl_version_as_float () |
Get current OpenGL version as a float: major_number.minor_number. | |
static CoreString | get_opengl_version_as_string () |
Get current OpenGL version as a string: major_number.minor_number. | |
static float | get_opengl_minimum_required_version_as_float () |
Get OpenGL minimum required version as a float: minimum_major_number.minimum_minor_number. | |
static bool | is_current_opengl_version_supported () |
Returns true if current OpenGL version is greater or equal to the minimum required version. | |
![]() | |
static CoreString | open_file (GuiApp &app, const CoreString &directory="", const CoreString &title="Open file", const CoreString &filter="") |
static CoreArray< CoreString > | open_files (GuiApp &app, const CoreString &directory="", const CoreString &title="Open files", const CoreString &filter="") |
static CoreString | open_folder (GuiApp &app, const CoreString &directory="", const CoreString &title="Choose folder") |
static CoreString | save_file (GuiApp &app, const CoreString &directory="", const CoreString &title="Save file", const CoreString &filter="", int *filter_selected=0) |
static CoreVector< OfItemHandle > | pick_objects (GuiApp &app, const CoreVector< OfItemHandle > ¤t_selection, const CoreVector< OfClass * > &filter_classes, OfContext *context=0, const CoreVector< OfItem * > &hidden_items=CoreVector< OfItem * >(), const bool &enable_multi_selection=false) |
static CoreVector< OfItemHandle > | pick_objects (GuiApp &app, const CoreVector< OfClass * > &filter_classes, OfContext *context=0, const bool &enable_multi_selection=false) |
static const char * | get_roundness_name (const Roundness &roundness) |
static const char * | get_constraint_name (const Constraint &constraint) |
static const char * | get_justify_name (const Justify &justification) |
static const char * | get_icon_position_name (const IconPosition &position) |
static GuiWidget * | get_focused_widget () |
static GuiWidget * | get_last_focused_widget () |
static GuiWidget * | get_last_event_widget () |
static void | intersect_box (const int &x1, const int &y1, const int &w1, const int &h1, const int &x2, const int &y2, const int &w2, const int &h2, int &x, int &y, int &w, int &h) |
static bool | intersect_box (const int &x1, const int &y1, const int &w1, const int &h1, const int &x2, const int &y2, const int &w2, const int &h2) |
static void | on_dnd_timeout (void *data) |
static const CoreVector < CoreBaseObject * > & | get_dnd_event_data () |
Return the data associated with the current Drag'n drop. The data is only valid if a widget is currently calling initiate_dnd_event, otherwise it is empty. | |
static GuiWidget * | get_dnd_widget () |
Return the GuiWidget that initiated the Drag'n drop. Null otherwise. | |
static GuiWidget * | get_dnd_accepting_widget () |
Return the GuiWidget that accepts the Drag'n drop. Null otherwise. | |
![]() | |
static void | connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0) |
Static version of the above function. | |
static void | connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0) |
Static version of the above function. | |
static void | connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0) |
Connects to an object to listen to a specific event. | |
static void | connect (EventObject &sender, EventInfoFunction event_cb, void *data=0) |
Connects to an object to listen any of its events. | |
static bool | disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0) |
static void | raise_event (EventObject &sender, const CoreString &event_id) |
Sends an event. | |
static void | raise_event (EventObject &sender, const EventInfo &event_info) |
Sends an event. | |
static void | connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0) |
Connects to an object to listen to a specific event. | |
static void | connect (EventObject &sender, EventFunction event_cb, void *data=0) |
Connects to an object to listen any of its events. | |
static void | connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0) |
Static version of the above function. | |
static void | connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0) |
Static version of the above function. | |
static bool | disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0) |
Disconnects this from an object for a specific event. | |
![]() | |
static void * | get_custom_data_key (const CoreString &key) |
![]() | |
static const CoreClassInfo & | class_info () |
template<class T > | |
static T * | cast (CoreBaseObject *object) |
template<class T > | |
static const T * | cast (const CoreBaseObject *object) |
![]() | |
static const CoreClassInfo & | class_info () |
Get the type descriptor of this instance. | |
Protected Member Functions | |
virtual | ~GuiGraphWidget () override |
Destructor. | |
void | on_gl_context_destroyed () override |
void | draw_grid (GuiDc &dc) |
Draw background grid with coords. | |
void | draw_highlighted_range (GuiDc &dc) |
void | draw_highlighted_x_value (GuiDc &dc) |
virtual CoreString | get_help () |
void | compute_cell_size (double &wanted_step, double &out_size, const GMathVec2i &cell_size_range, const double &zone_size, const int &zone_size_px) |
Compute cell size and modify step if necessary. | |
void | update_cell_info () |
void | compute_cell_info () |
void | compute_first_cell_location () |
void | update_first_cell_location () |
void | clear_curves () |
Removes all curves from graph. | |
virtual int | process_event (const CoreString &evt) override |
This method is called whenever an event happens on this widget. Override this to catch and process them. | |
void | on_remove_item (GuiGraphItem &item) |
void | manage_pan (const int &d_x, const int &d_y) |
Manages panning movement on the grid. | |
void | move_items (Gui::MouseButtonId mb) |
Manages the movement of selected items. | |
virtual void | manage_highlight () |
Manages highlighting of the item under mouse. Un-highlight previous item if its no more under mouse. | |
virtual void | manage_popup_menu () |
Invoked when user right-clicks. | |
virtual void | add_to_popup_menu (GuiMenu &menu) |
virtual void | manage_add_point () |
virtual void | manage_insert_point (double x) |
virtual void | manage_remove () |
virtual void | selection_changed () |
virtual void | manage_move_points (const CoreSet< GuiGraphItem * > &items, Gui::MouseButtonId mb) |
virtual void | manage_move_tangent (GuiGraphTangent &tangent) |
virtual bool | get_can_move_tangent (GuiGraphTangent &tangent) |
virtual void | manage_move_time () |
virtual void | manage_move_gizmo () |
virtual void | end_move_points (Gui::MouseButtonId mb) |
virtual void | end_move_tangent () |
virtual void | end_move_time () |
virtual void | end_move_gizmo () |
virtual void | cancel_move_points () |
virtual void | cancel_move_tangent () |
virtual void | cancel_move_time () |
virtual void | cancel_move_gizmo () |
void | set_highlighted_x_value (const double &value) |
const double & | get_highlighted_x_value () const |
void | set_highlighted_range (const double &min, const double &max) |
const GMathVec2d & | get_highlighted_range () const |
void | compute_view_area () |
const GMathVec4i & | get_view_area () const |
void | set_mouse_coords (const int &x, const int &y) |
void | set_move_initial_mouse_coords (const int &x, const int &y) |
const int & | get_move_initial_mouse_x () const |
const int & | get_move_initial_mouse_y () const |
double | compute_graph_y_from_mouse (const int &mouse_y) |
double | compute_graph_x_from_mouse (const int &mouse_x) |
void | set_graph_zoom_level (const double &zoom_x, const double &zoom_y) |
void | set_graph_zoom_level_x (const double &x) |
void | set_graph_zoom_level_y (const double &y) |
void | set_graph_offset (const double &x, const double &y) |
void | set_graph_offset_x (const double &x) |
void | set_graph_offset_y (const double &y) |
void | set_first_cell_value (const double &x, const double &y) |
void | set_graph_cell_step (const double &step_x, const double &step_y) |
void | set_cell_current_size_px (const double &width, const double &height) |
const GMathVec3uc & | get_bg_color () const |
const GMathVec3uc & | get_visible_range_color () const |
const GMathVec3uc & | get_current_frame_color () const |
const GMathVec3uc & | get_grid_line_color () const |
const GMathVec3uc & | get_grid_text_color () const |
const GMathVec3uc & | get_grid_line_zero_color () const |
int | compute_pos_x_px (const double &graph_pos_x) const |
int | compute_pos_y_px (const double &graph_pos_y) const |
const CoreHashTable < GMathVec3uc, GuiGraphItem * > & | get_select_items () const |
GuiGraphItem * | get_object_under_mouse () |
GuiGraphItem * | get_previous_object_under_mouse () |
void | set_selection (const CoreSet< GuiGraphItem * > &selection, bool notify=true) |
Replaces selection content with incoming items. | |
const CoreSet< GuiGraphItem * > & | get_selection () |
void | clear_selection (bool notify=true) |
Clears graph selection. | |
void | manage_select_item (const bool &add) |
select under mouse item | |
void | manage_rectangle_selection (const bool &add) |
Selects items in the current selection rectangle and resets the rectangle. | |
void | remove_from_selection (GuiGraphItem *item, bool quiet=false) |
Removes incoming item from selection. | |
void | update_selection_rectangle () |
Updates the selection rectangle coordinates with current mouse coords. | |
void | add_to_selection (GuiGraphItem &item, bool single_type=true) |
Adds given item to selected items. | |
void | get_items_in_zone (const GMathVec4i &rect, CoreSet< GuiGraphItem * > &items) |
Retrieves items in a rectangular zone. | |
GuiGraphTangent * | get_moving_tangent () const |
void | set_moving_tangent (GuiGraphTangent *tangent) |
bool | get_is_state_idle () const |
bool | get_is_state_item_move () const |
bool | get_is_state_tangent_move () const |
bool | get_is_state_graph_pan () const |
bool | get_is_state_multiselection_square () const |
bool | get_is_state_timeline_move () const |
bool | get_is_state_gizmo_move () const |
void | set_state_item_move (const bool &value) |
void | set_state_tangent_move (const bool &value) |
void | set_state_graph_pan (const bool &value) |
void | set_state_multiselection_square (const bool &value) |
void | set_state_timeline_move (const bool &value) |
void | set_state_gizmo_move (const bool &value) |
void | update_color_scheme (const GuiColorScheme &scheme) |
const CoreString & | get_unit_values () const |
void | set_unit_values (const CoreString &unit) |
const OfAttr::Type & | get_type_values () const |
void | set_values_unit (const OfAttr::Type &type) |
![]() | |
virtual | ~GuiGlWidget () override |
Destructor. | |
virtual GuiDc & | get_dc () override |
virtual void | destroy () |
bool | is_valid () const |
bool | is_context_valid () const |
void | reset_context () |
virtual void | widget_redraw () override |
virtual Fl_Widget * | get_widget () const override |
virtual Fl_Group * | get_group () const override |
CoreString | get_ellipsed_text (const CoreString &txt, const int &w, const TextEllipsis &ellipsis) |
void | set_active_font (GuiFont &font) |
void | use_active_font () |
const GuiFont::FontDesc * | get_active_font_desc () const |
FontGlData * | get_active_font_data () const |
void | enable_stencil () |
void | set_widget_border_size (unsigned int border_size) |
const unsigned int & | get_widget_border_size () const |
void | set_gl_widget_viewport () |
set the gl viewport for the widget with a border | |
void | on_hud_pref_change (GuiApp &app, const EventInfo &event, void *data) |
void | overlay_draw_safe_frame (GuiDc &dc, int width, int height) |
draw composition frame according to current HUD_SETTING_OVRID_LIVE_AREA_FRAME, and if activated, HUD_SETTING_OVRID_ACTION/TITLE/USER_FRAME | |
void | overlay_draw_composition_guide (GuiDc &dc, int width, int height, bool yup) |
draw composition guide according to current HUD_SETTING_OVRID_OVERLAY, HUD_SETTING_OVRID_OVERLAY_XFLIP and HUD_SETTING_OVRID_OVERLAY_YFLIP | |
virtual void | overlay_transform2d (double &x, double &y) const |
![]() | |
GuiWidget (CreateWidget create_widget, GuiWidget &parent, const int &x, const int &y, const int &w, const int &h) | |
GuiWidget (CreateWidget create_widget, GuiApp &app, const int &x, const int &y, const int &w, const int &h) | |
void | clear_all_children () |
void | damage (const unsigned char &mask) |
const bool | is_damaged (const unsigned char &mask) const |
const unsigned char | get_damage () const |
void | create_delayed_parenting (Fl_Group *group) const |
void | recompute_constraints () |
virtual void | push_clip (const int &x, const int &y, const int &w, const int &h) |
virtual void | pop_clip () |
void | get_text_size (const CoreString &text, int &w, int &h) const |
void | get_text_size (const char *text, int &w, int &h) const |
virtual void | on_add_child (GuiWidget *child) |
virtual void | on_remove_child (GuiWidget *child) |
virtual void | apply_constraints (const int &px, const int &py, const int &pw, const int &ph) |
void | apply_children_constraints (const int &px, const int &py, const int &pw, const int &ph) const |
void | apply_constraints (GuiWidget &child, const int &px, const int &py, const int &pw, const int &ph) const |
virtual void | apply_clipping () |
void | apply_children_clipping () |
void | capture_events (const bool &value) |
virtual bool | process_actions () |
Static Protected Member Functions | |
static void | on_delete_items (GuiWidget &sender, const GuiAction &action, void *data) |
static void | on_insert_value (GuiWidget &sender, const GuiAction &action, void *data) |
static void | on_fit (GuiWidget &sender, const GuiAction &action, void *data) |
static void | on_select_all (GuiWidget &sender, const GuiAction &action, void *data) |
Callback for "SelectAll" action. | |
static void | on_select_neighbor (GuiWidget &sender, const GuiAction &action, void *data) |
Callback for "Select Previous/Next" and all selection extent actions. | |
![]() | |
static GlUtilsGlCtx & | get_gl_context () |
Return the shared gl context for shared gl list/texture deletion... | |
static void | generate_gl_fonts () |
Compute opengl fonts. Must be called before a font can be drawn in opengl. | |
static void | add_overlay_options (GuiGlHudSettings &hud_settings) |
Friends | |
class | GuiGraphCurve |
class | GuiGraphPoint |
Additional Inherited Members | |
![]() | |
static const unsigned int | kDefaultWidgetBorderSize = 2u |
![]() | |
enum | HudSettingOvrId { HUD_SETTING_OVRID_INFO_SHOW =0, HUD_SETTING_OVRID_OVERLAY_SHOW, HUD_SETTING_OVRID_OVERLAY_TYPE, HUD_SETTING_OVRID_OVERLAY_XFLIP, HUD_SETTING_OVRID_OVERLAY_YFLIP, HUD_SETTING_OVRID_SAFE_FRAME_SHOW, HUD_SETTING_OVRID_SAFE_FRAME_CAPTION, HUD_SETTING_OVRID_LIVE_AREA_FRAME, HUD_SETTING_OVRID_ACTION_FRAME, HUD_SETTING_OVRID_ACTION_FRAME_XYVALUE, HUD_SETTING_OVRID_TITLE_FRAME, HUD_SETTING_OVRID_TITLE_FRAME_XYVALUE, HUD_SETTING_OVRID_USER_FRAME, HUD_SETTING_OVRID_USER_FRAME_XYVALUE, HUD_SETTING_OVRID_COUNT } |
![]() | |
GuiGlHudSettings | m_overlay_settings |
Widget class to display one or several curves. Manages grid display, curve and points creation and events.
GuiGraphWidget::GuiGraphWidget | ( | GuiWidget & | parent, |
const int & | x, | ||
const int & | y, | ||
const int & | w, | ||
const int & | h | ||
) |
Constructor.
[in] | parent | parent widget |
[in] | x | widget x position |
[in] | y | widget y position |
[in] | w | widget width |
[in] | h | widget height |
void GuiGraphWidget::add_select_item | ( | GuiGraphItem & | item, |
GMathVec3uc & | picking_color | ||
) |
register an item to be selectable and generate a unique color for it.
[in] | object | to be selectable |
[out] | generated | color |
|
protected |
Compute cell size and modify step if necessary.
[out] | wanted_step | the initial step we want, which can be modified if its impossible due to cell size limitations. |
[out] | out_size | computed size. any incoming value will be replaced |
[in] | cell_size_range | min and max size of the cell |
[in] | zone_size | size of the displaying zone in graph unit |
[in] | zone_size | size of the displaying zone in pixels |
|
overridevirtual |
This is the main drawing method of the widget.
dc | The drawing context used to draw stuff. |
Reimplemented from GuiGlWidget.
|
protected |
Retrieves items in a rectangular zone.
[in] | rect | zone to search in |
[out] | items | set to fill with results |
|
protected |
Manages panning movement on the grid.
[in] | d_x | delta x movement |
[in] | d_y | delta y movement |
|
protected |
Selects items in the current selection rectangle and resets the rectangle.
[in] | add | specify if we add the items to the selection or if we toggle their selection state |
|
protected |
select under mouse item
[in] | add | specify if we add the item to the selection or if we toggle selection state |
void GuiGraphWidget::pick_objects | ( | GuiDc & | dc, |
int | mouse_x, | ||
int | mouse_y | ||
) |
Check for objects under the given mouse coordinates.
[in] | mouse_x | x coordinate (left origin) |
[in] | mouse_y | y coordinate (top origin) |
|
overrideprotectedvirtual |
This method is called whenever an event happens on this widget. Override this to catch and process them.
event_id | The event name. |
Reimplemented from GuiWidget.