viewport.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. //view data structure
  12. #include "smyrnadefs.h"
  13. #include <gtk/gtk.h>
  14. #include <xdot/xdot.h>
  15. #include <cgraph/cgraph.h>
  16. void init_viewport(ViewInfo * view);
  17. void set_viewport_settings_from_template(ViewInfo * view, Agraph_t *);
  18. void switch_graph(int);
  19. void refreshViewport(void);
  20. int add_graph_to_viewport_from_file(char *fileName);
  21. int add_graph_to_viewport(Agraph_t * graph, char *);
  22. void close_graph(ViewInfo * view);
  23. int save_graph(void);
  24. int save_graph_with_file_name(Agraph_t * graph, char *fileName);
  25. int save_as_graph(void);
  26. int do_graph_layout(Agraph_t * graph, int Engine, int keeppos);
  27. void glexpose(void);
  28. void getcolorfromschema(const colorschemaset sc, float l, float maxl,
  29. glCompColor *c);
  30. void updateRecord (Agraph_t* g);
  31. /* helper functions */
  32. extern char *get_attribute_value(char *attr, ViewInfo * view,
  33. Agraph_t * g);