Graphviz 13.0.0~dev.20241220.2304
|
#include <assert.h>
#include "viewport.h"
#include "draw.h"
#include <common/color.h>
#include <glade/glade.h>
#include "gui.h"
#include <limits.h>
#include "menucallbacks.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "glcompui.h"
#include "gltemplate.h"
#include <common/colorprocs.h>
#include "topviewsettings.h"
#include "arcball.h"
#include "hotkeymap.h"
#include "topviewfuncs.h"
#include <util/alloc.h>
#include <util/exit.h>
#include <util/strcasecmp.h>
Go to the source code of this file.
Data Structures | |
struct | colordata |
Macros | |
#define | CSZ(x) (sizeof(x)/sizeof(char*)) |
#define | NUM_SCHEMES (sizeof(palette)/sizeof(colordata)) |
Variables | |
ViewInfo * | view |
static char * | deep_blue [] |
static char * | pastel [] |
static char * | magma [] |
static char * | rain_forest [] |
static colordata | palette [] |
#define CSZ | ( | x | ) | (sizeof(x)/sizeof(char*)) |
Definition at line 602 of file viewport.c.
Definition at line 613 of file viewport.c.
|
static |
Definition at line 425 of file viewport.c.
References _ViewInfo::activeGraph, id, refreshViewport(), and view.
Referenced by add_graph_to_viewport(), and switch_graph().
int add_graph_to_viewport | ( | Agraph_t * | graph, |
char * | id | ||
) |
Definition at line 431 of file viewport.c.
References activate(), _ViewInfo::g, graph(), _ViewInfo::graphComboBox, _ViewInfo::graphCount, gv_recalloc(), and view.
Referenced by add_graph_to_viewport_from_file(), and run_gvpr().
int add_graph_to_viewport_from_file | ( | char * | fileName | ) |
Definition at line 364 of file viewport.c.
References add_graph_to_viewport(), fileName(), graph(), and loadGraph().
Referenced by cb_display(), expose_event(), and mOpenSlot().
|
static |
Definition at line 185 of file viewport.c.
References free(), and colorschemaset::s.
Referenced by create_color_theme(), and init_viewport().
|
static |
Definition at line 39 of file viewport.c.
References _ViewInfo::activeGraph, agclose(), _ViewInfo::g, and _ViewInfo::graphCount.
Referenced by close_graph().
void close_graph | ( | ViewInfo * | vi | ) |
Definition at line 71 of file viewport.c.
References _ViewInfo::activeGraph, and clear_viewport().
Referenced by cb_display(), expose_event(), mCloseSlot(), and mQuitSlot().
|
static |
Definition at line 615 of file viewport.c.
References clear_color_theme(), colordata::cnt, _ViewInfo::colschms, gv_calloc(), NUM_SCHEMES, palette, set_color_theme_color(), and view.
Referenced by set_viewport_settings_from_template().
Definition at line 77 of file viewport.c.
References agget(), systemgraphs::def_attrs, and _ViewInfo::systemGraphs.
Referenced by changetopfishfocus(), prepare_topological_fisheye(), and set_viewport_settings_from_template().
|
static |
Definition at line 179 of file viewport.c.
References free(), smyrnaPath(), _ViewInfo::template_file, and view.
Referenced by init_viewport().
|
static |
Definition at line 43 of file viewport.c.
Referenced by set_viewport_settings_from_template().
void getcolorfromschema | ( | const colorschemaset | sc, |
float | l, | ||
float | maxl, | ||
glCompColor * | c | ||
) |
Definition at line 550 of file viewport.c.
References glCompColor::A, glCompColor::B, colorschema::c, glCompColor::G, interpol(), colorschema::perc, glCompColor::R, colorschemaset::s, and colorschemaset::schemacount.
Referenced by object_color().
|
static |
Definition at line 168 of file viewport.c.
References _ViewInfo::activeGraph, topview::animate, _ViewInfo::drawing_area, expose_event(), topview::fisheyeParams, NULL, _ViewInfo::Topview, and view.
Referenced by init_viewport().
void glexpose | ( | void | ) |
Definition at line 540 of file viewport.c.
References _ViewInfo::drawing_area, expose_event(), NULL, and view.
Referenced by appmouse_key_release(), btnToolFit_clicked(), glCompMouseMove(), glmotion_zoom_inc(), and scroll_event().
|
static |
Definition at line 396 of file viewport.c.
References agattr(), agbindrec(), AGNODE, AGRAPH, GG_edgelabelcolor, GG_elabelattribute, GG_labelattribute, GG_nodelabelcolor, GN_pos, and updateRecord().
Referenced by refreshViewport().
void init_viewport | ( | ViewInfo * | vi | ) |
Definition at line 190 of file viewport.c.
References glCompColor::A, _ViewInfo::active_camera, _ViewInfo::active_frame, _ViewInfo::activeGraph, agread(), _ViewInfo::arcball, systemgraphs::attrs_widgets, glCompColor::B, _ViewInfo::bdVisible, _ViewInfo::bdxLeft, _ViewInfo::bdxRight, _ViewInfo::bdyBottom, _ViewInfo::bdyTop, _ViewInfo::bgColor, _ViewInfo::borderColor, _ViewInfo::camera_count, _ViewInfo::cameras, clear_color_theme(), levelparms_t::coarsening_rate, _ViewInfo::colschms, systemgraphs::def_attrs, hierparms_t::dist2_limit, reposition_t::distortion, glCompMouse::down, _ViewInfo::fillColor, topview::fisheyeParams, free(), topview::fs, _ViewInfo::g, glCompColor::G, get_data_dir(), gl_main_expose(), glcreate_gl_topview_menu(), _ViewInfo::graphCount, topview::Graphdata, _graph_data::GraphFileName, graphviz_exit(), _ViewInfo::gridColor, _ViewInfo::gridSize, _ViewInfo::gridVisible, GUI_FULLSCREEN, GUI_WINDOWED, _ViewInfo::guiMode, gv_alloc(), reposition_t::height, topview::hier, topview::level, _ViewInfo::LineWidth, load_mouse_actions(), _ViewInfo::mouse, NULL, levelparms_t::num_fine_nodes, _ViewInfo::panx, _ViewInfo::pany, _ViewInfo::panz, _ViewInfo::penColor, glCompColor::R, topview::repos, _ViewInfo::selectedNodeColor, set_viewport_settings_from_template(), SIZE_MAX, smyrnaPath(), _ViewInfo::systemGraphs, _ViewInfo::template_file, _ViewInfo::timer, _ViewInfo::timer2, _ViewInfo::timer3, _ViewInfo::Topview, _ViewInfo::total_frames, _ViewInfo::widgets, reposition_t::width, topview::xDot, and _ViewInfo::zoom.
Referenced by main().
|
static |
Definition at line 545 of file viewport.c.
Referenced by getcolorfromschema().
|
static |
Definition at line 335 of file viewport.c.
References agattr(), agclose(), agnameof(), AGNODE, agread(), topview::Graphdata, _graph_data::GraphFileName, gv_strdup(), NULL, _ViewInfo::Topview, and view.
Referenced by add_graph_to_viewport_from_file().
void refreshViewport | ( | void | ) |
Definition at line 411 of file viewport.c.
References _ViewInfo::activeGraph, _ViewInfo::drawing_area, expose_event(), _ViewInfo::g, graph(), graphRecord(), GUI_FULLSCREEN, _ViewInfo::guiMode, initSmGraph(), load_settings_from_graph(), NULL, set_viewport_settings_from_template(), _ViewInfo::Topview, update_graph_from_settings(), and view.
Referenced by activate(), and run_gvpr().
int save_as_graph | ( | void | ) |
Definition at line 510 of file viewport.c.
References _ViewInfo::activeGraph, _ViewInfo::g, NULL, save_graph_with_file_name(), and view.
Referenced by mSaveAsSlot(), and save_graph().
int save_graph | ( | void | ) |
Definition at line 490 of file viewport.c.
References _ViewInfo::activeGraph, _ViewInfo::g, topview::Graphdata, _graph_data::GraphFileName, save_as_graph(), save_graph_with_file_name(), _ViewInfo::Topview, and view.
Referenced by mSaveSlot().
int save_graph_with_file_name | ( | Agraph_t * | graph, |
char * | fileName | ||
) |
Definition at line 460 of file viewport.c.
References agwrite(), fileName(), graph(), topview::Graphdata, _graph_data::GraphFileName, NULL, _ViewInfo::Topview, update_graph_params(), and view.
Referenced by save_as_graph(), save_as_graph_clicked(), and save_graph().
|
static |
Definition at line 573 of file viewport.c.
References glCompColor::A, glCompColor::B, colorschema::c, colorxlate(), glCompColor::G, colorschema::perc, glCompColor::R, color_s::RGBA, RGBA_DOUBLE, colorschemaset::s, colorschemaset::schemacount, and color_s::u.
Referenced by create_color_theme().
Definition at line 85 of file viewport.c.
References glCompColor::A, glCompColor::B, _ViewInfo::bdVisible, _ViewInfo::bgColor, _ViewInfo::borderColor, colorxlate(), _ViewInfo::colschms, create_color_theme(), _ViewInfo::defaultnodealpha, _ViewInfo::drawedgelabels, _ViewInfo::drawedges, _ViewInfo::drawnodelabels, _ViewInfo::drawnodes, _ViewInfo::edgelabelcolor, glCompColor::G, get_attribute_value(), get_glut_font(), _ViewInfo::glutfont, _ViewInfo::graphCount, _ViewInfo::gridColor, _ViewInfo::gridSize, _ViewInfo::gridVisible, _ViewInfo::labelnumberofnodes, _ViewInfo::labelshowedges, _ViewInfo::labelshownodes, _ViewInfo::LineWidth, _ViewInfo::nodelabelcolor, _ViewInfo::nodeScale, glCompColor::R, color_s::RGBA, RGBA_DOUBLE, _ViewInfo::selectedNodeColor, and color_s::u.
Referenced by init_viewport(), on_settingsApplyBtn_clicked(), and refreshViewport().
void switch_graph | ( | int | graphId | ) |
Definition at line 449 of file viewport.c.
References activate(), _ViewInfo::graphCount, and view.
Referenced by on_btnActivateGraph_clicked().
|
static |
Definition at line 329 of file viewport.c.
References agattr(), AGRAPH, graph(), topview::Graphdata, _graph_data::GraphFileName, _ViewInfo::Topview, and view.
Referenced by save_graph_with_file_name().
void updateRecord | ( | Agraph_t * | g | ) |
Definition at line 374 of file viewport.c.
References agattr(), AGEDGE, AGNODE, GE_labelattribute, GE_pos, GE_selected, GE_visible, GN_labelattribute, GN_selected, GN_size, and GN_visible.
Referenced by graphRecord(), and run_gvpr().
|
static |
Definition at line 590 of file viewport.c.
|
static |
Definition at line 596 of file viewport.c.
|
static |
|
static |
Definition at line 593 of file viewport.c.
|
static |
Definition at line 599 of file viewport.c.
ViewInfo* view |
Definition at line 37 of file viewport.c.
Referenced by activate(), add_graph_to_viewport(), aglocaldictsym(), apply_actions(), appmouse_down(), appmouse_key_release(), appmouse_up(), arcmouseClick(), arcmouseDrag(), btnToolFit_clicked(), btnToolZoomFit_clicked(), button_press_event(), button_release_event(), cb_display(), cb_drag(), cb_keyboard(), cb_keyboard_up(), cb_mouseclick(), cb_reshape(), cb_special_key(), cb_special_key_up(), change_cursor(), changetopfishfocus(), configure_event(), create_color_theme(), create_save_subgraph_from_filter(), create_window(), deselect_all(), doApply(), draw_selpoly(), draw_xdot(), DrawBezier(), DrawBeziers(), drawCircle(), DrawEllipse(), DrawPolygon(), DrawPolyline(), drawRotatingAxis(), drawtopfishedges(), drawtopfishnodes(), dtview(), EmbedText(), expose_event(), get_active_frame(), get_button(), get_data_dir(), get_temp_coords(), GetglCompColor(), gl_main_expose(), glcreate_gl_topview_menu(), glexpose(), glmotion_zoom(), glmotion_zoom_inc(), graph_zoom(), gvpr_select(), initSmGraph(), key_press_event(), key_release_event(), load_attr_list(), load_graph_properties(), load_settings_from_graph(), loadGraph(), main(), mCloseSlot(), menu_click_add_camera(), menu_click_center(), menu_click_pan(), menu_switch_to_fisheye(), mGraphPropertiesSlot(), mNodeListSlot(), motion_notify_event(), mPropertiesSlot(), mQuitSlot(), mShowToolBoxSlot(), mTestgvpr(), object_color(), on_attrAddBtn_clicked(), on_attrRB0_clicked(), on_btnActivateGraph_clicked(), on_settingsApplyBtn_clicked(), on_txtAttr_changed(), pick_object(), pick_objects_in_rect(), pick_objects_rect(), prepare_topological_fisheye(), realize(), refreshViewport(), Render_Contour2(), renderEdgeLabels(), renderEdges(), renderNodeLabels(), renderNodes(), renderSelectedNodes(), renderSmGraph(), run_gvpr(), save_as_graph(), save_as_graph_clicked(), save_graph(), save_graph_with_file_name(), scroll_event(), select_polygon(), selectedges(), selectnodes(), set_boundaries(), set_checkbox_widget(), set_color_button_widget(), set_combobox_widget(), set_header_text(), set_options(), set_scalebtn_widget_to_attribute(), set_spinbtn_widget(), set_text_widget(), SetFillColor(), SetPenColor(), show_settings_form(), showAttrsWidget(), switch2D3D(), switch_graph(), tv_hide_all(), tv_show_all(), update_graph_from_settings(), update_graph_params(), updateSmGraph(), windowedMode(), write_dict(), and writeDict().