gui_inst.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * gui_inst.h - GUI, instance functions
  3. *
  4. * Written 2009, 2010 by Werner Almesberger
  5. * Copyright 2009, 2010 by Werner Almesberger
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #ifndef GUI_INST_H
  13. #define GUI_INST_H
  14. #include <gtk/gtk.h>
  15. #include "coord.h"
  16. #include "inst.h"
  17. #include "gui_status.h"
  18. struct coord translate(struct coord pos);
  19. struct coord canvas_to_coord(int x, int y);
  20. unit_type gui_dist_vec(struct inst *self, struct coord pos, unit_type scale);
  21. unit_type gui_dist_vec_fallback(struct inst *self, struct coord pos,
  22. unit_type scale);
  23. unit_type gui_dist_line(struct inst *self, struct coord pos, unit_type scale);
  24. unit_type gui_dist_rect(struct inst *self, struct coord pos, unit_type scale);
  25. unit_type gui_dist_pad(struct inst *self, struct coord pos, unit_type scale);
  26. unit_type gui_dist_hole(struct inst *self, struct coord pos, unit_type scale);
  27. unit_type gui_dist_arc(struct inst *self, struct coord pos, unit_type scale);
  28. unit_type gui_dist_meas(struct inst *self, struct coord pos, unit_type scale);
  29. unit_type gui_dist_frame(struct inst *self, struct coord pos, unit_type scale);
  30. unit_type gui_dist_frame_eye(struct inst *self, struct coord pos,
  31. unit_type scale);
  32. void project_meas(const struct inst *inst, struct coord *a1, struct coord *b1);
  33. char *format_len(const char *label, unit_type len, enum curr_unit unit);
  34. void gui_draw_vec(struct inst *self);
  35. void gui_draw_line(struct inst *self);
  36. void gui_draw_rect(struct inst *self);
  37. void gui_draw_pad(struct inst *self);
  38. void gui_draw_rpad(struct inst *self);
  39. void gui_draw_hole(struct inst *self);
  40. void gui_draw_arc(struct inst *self);
  41. void gui_draw_meas(struct inst *self);
  42. void gui_draw_frame(struct inst *self);
  43. void gui_highlight_vec(struct inst *self);
  44. #endif /* !GUI_INST_H */