pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "global.h"
#include "crosshair.h"
#include "data.h"
#include "misc.h"
#include "action.h"
#include "set.h"
#include "pcb-printf.h"
#include "gui.h"
#include <gdk/gdkkeysyms.h>
Go to the source code of this file.
Defines | |
#define | CUSTOM_CURSOR_CLOCKWISE (GDK_LAST_CURSOR + 10) |
#define | CUSTOM_CURSOR_DRAG (GDK_LAST_CURSOR + 11) |
#define | CUSTOM_CURSOR_LOCK (GDK_LAST_CURSOR + 12) |
#define | ICON_X_HOT 8 |
#define | ICON_Y_HOT 8 |
Functions | |
void | ghid_status_line_set_text (const gchar *text) |
void | ghid_cursor_position_label_set_text (gchar *text) |
void | ghid_cursor_position_relative_label_set_text (gchar *text) |
static GdkCursorType | gport_set_cursor (GdkCursorType shape) |
void | ghid_point_cursor (void) |
void | ghid_hand_cursor (void) |
void | ghid_watch_cursor (void) |
void | ghid_mode_cursor (int Mode) |
void | ghid_corner_cursor (void) |
void | ghid_restore_cursor (void) |
static gboolean | loop_key_press_cb (GtkWidget *drawing_area, GdkEventKey *kev, GMainLoop **loop) |
static gboolean | loop_button_press_cb (GtkWidget *drawing_area, GdkEventButton *ev, GMainLoop **loop) |
static gboolean | run_get_location_loop (const gchar *message) |
void | ghid_get_user_xy (const char *msg) |
void | ghid_create_abort_dialog (char *msg) |
gboolean | ghid_check_abort (void) |
void | ghid_end_abort (void) |
void | ghid_get_pointer (int *x, int *y) |
void | ghid_set_status_line_label (void) |
void | ghid_set_cursor_position_labels (void) |
Variables | |
GdkPixmap * | XC_clock_source |
GdkPixmap * | XC_clock_mask |
GdkPixmap * | XC_hand_source |
GdkPixmap * | XC_hand_mask |
GdkPixmap * | XC_lock_source |
GdkPixmap * | XC_lock_mask |
static GdkCursorType | oldCursor |
static gboolean | got_location |
#define CUSTOM_CURSOR_CLOCKWISE (GDK_LAST_CURSOR + 10) |
Definition at line 44 of file gui-misc.c.
Referenced by ghid_mode_cursor(), and gport_set_cursor().
#define CUSTOM_CURSOR_DRAG (GDK_LAST_CURSOR + 11) |
Definition at line 45 of file gui-misc.c.
Referenced by ghid_mode_cursor(), and gport_set_cursor().
#define CUSTOM_CURSOR_LOCK (GDK_LAST_CURSOR + 12) |
Definition at line 46 of file gui-misc.c.
Referenced by ghid_mode_cursor(), and gport_set_cursor().
#define ICON_X_HOT 8 |
Definition at line 48 of file gui-misc.c.
Referenced by gport_set_cursor().
#define ICON_Y_HOT 8 |
Definition at line 49 of file gui-misc.c.
Referenced by gport_set_cursor().
gboolean ghid_check_abort | ( | void | ) |
Definition at line 376 of file gui-misc.c.
References FALSE.
void ghid_corner_cursor | ( | void | ) |
Definition at line 218 of file gui-misc.c.
References CrosshairType::AttachedBox, Crosshair, gport, gport_set_cursor(), AttachedBoxType::Point1, PointType::X, CrosshairType::X, GHidPort::X_cursor_shape, PointType::Y, and CrosshairType::Y.
void ghid_create_abort_dialog | ( | char * | msg | ) |
Definition at line 371 of file gui-misc.c.
void ghid_cursor_position_label_set_text | ( | gchar * | text | ) |
Definition at line 68 of file gui-misc.c.
References GhidGui::cursor_position_absolute_label, ghid_label_set_markup(), and ghidgui.
Referenced by ghid_set_cursor_position_labels().
void ghid_cursor_position_relative_label_set_text | ( | gchar * | text | ) |
Definition at line 74 of file gui-misc.c.
References GhidGui::cursor_position_relative_label, ghid_label_set_markup(), and ghidgui.
Referenced by ghid_set_cursor_position_labels().
void ghid_end_abort | ( | void | ) |
Definition at line 382 of file gui-misc.c.
void ghid_get_pointer | ( | int * | x, |
int * | y | ||
) |
Definition at line 387 of file gui-misc.c.
References GHidPort::drawing_area, and gport.
void ghid_get_user_xy | ( | const char * | msg | ) |
Definition at line 363 of file gui-misc.c.
References run_get_location_loop().
Referenced by ghid_get_coords().
void ghid_hand_cursor | ( | void | ) |
Definition at line 131 of file gui-misc.c.
References gport_set_cursor(), and oldCursor.
Referenced by run_get_location_loop().
void ghid_mode_cursor | ( | int | Mode | ) |
Definition at line 147 of file gui-misc.c.
References ARC_MODE, ARROW_MODE, COPY_MODE, CUSTOM_CURSOR_CLOCKWISE, CUSTOM_CURSOR_DRAG, CUSTOM_CURSOR_LOCK, ghid_shift_is_pressed(), gport_set_cursor(), INSERTPOINT_MODE, LINE_MODE, LOCK_MODE, MOVE_MODE, NO_MODE, PASTEBUFFER_MODE, POLYGON_MODE, POLYGONHOLE_MODE, RECTANGLE_MODE, REMOVE_MODE, ROTATE_MODE, TEXT_MODE, THERMAL_MODE, and VIA_MODE.
Referenced by do_set_mode(), ghid_idle_cb(), ghid_timer(), ghid_watch(), and PointCursor().
void ghid_point_cursor | ( | void | ) |
Definition at line 125 of file gui-misc.c.
References gport_set_cursor(), and oldCursor.
Referenced by PointCursor().
void ghid_restore_cursor | ( | void | ) |
Definition at line 233 of file gui-misc.c.
References gport_set_cursor(), and oldCursor.
Referenced by run_get_location_loop().
void ghid_set_cursor_position_labels | ( | void | ) |
Definition at line 440 of file gui-misc.c.
References _, unit::allow, Crosshair, Distance(), ghid_cursor_position_label_set_text(), ghid_cursor_position_relative_label_set_text(), SettingType::grid_unit, Marked, pcb_g_strdup_printf(), RAD_TO_DEG, Settings, MarkType::status, MarkType::X, CrosshairType::X, MarkType::Y, and CrosshairType::Y.
Referenced by ghid_config_handle_units_changed(), ghid_note_event_location(), and ghid_set_crosshair().
void ghid_set_status_line_label | ( | void | ) |
Definition at line 403 of file gui-misc.c.
References _, unit::allow, SettingType::BufferNumber, C_, PCBType::Clipping, GhidGui::compact_horizontal, ghid_status_line_set_text(), ghidgui, PCBType::Grid, SettingType::grid_unit, SettingType::Keepaway, SettingType::LineThickness, PCB, pcb_g_strdup_printf(), Settings, SettingType::ShowBottomSide, TEST_FLAG, SettingType::TextScale, SettingType::ViaDrillingHole, and SettingType::ViaThickness.
Referenced by config_compact_horizontal_toggle_cb(), ghid_handle_user_command(), ghid_menu_cb(), ghid_port_button_press_cb(), ghid_port_button_release_cb(), ghid_sync_with_new_layout(), ghid_zoom_view_abs(), route_style_changed_cb(), run_get_location_loop(), SetUnits(), and text_spin_button_cb().
void ghid_status_line_set_text | ( | const gchar * | text | ) |
Definition at line 59 of file gui-misc.c.
References GhidGui::command_entry_status_line_active, ghid_label_set_markup(), ghidgui, and GhidGui::status_line_label.
Referenced by ghid_command_entry_get(), ghid_set_status_line_label(), and run_get_location_loop().
void ghid_watch_cursor | ( | void | ) |
Definition at line 137 of file gui-misc.c.
References gport_set_cursor(), and oldCursor.
Referenced by Busy().
static GdkCursorType gport_set_cursor | ( | GdkCursorType | shape | ) | [static] |
Definition at line 80 of file gui-misc.c.
References CUSTOM_CURSOR_CLOCKWISE, CUSTOM_CURSOR_DRAG, CUSTOM_CURSOR_LOCK, GHidPort::drawing_area, gport, ICON_X_HOT, ICON_Y_HOT, window, GHidPort::X_cursor, GHidPort::X_cursor_shape, XC_clock_mask, XC_clock_source, XC_hand_mask, XC_hand_source, XC_lock_mask, and XC_lock_source.
Referenced by ghid_corner_cursor(), ghid_hand_cursor(), ghid_mode_cursor(), ghid_point_cursor(), ghid_restore_cursor(), and ghid_watch_cursor().
static gboolean loop_button_press_cb | ( | GtkWidget * | drawing_area, |
GdkEventButton * | ev, | ||
GMainLoop ** | loop | ||
) | [static] |
Definition at line 275 of file gui-misc.c.
References ghid_note_event_location(), and TRUE.
Referenced by run_get_location_loop().
static gboolean loop_key_press_cb | ( | GtkWidget * | drawing_area, |
GdkEventKey * | kev, | ||
GMainLoop ** | loop | ||
) | [static] |
Definition at line 247 of file gui-misc.c.
References FALSE, ghid_is_modifier_key_sym(), got_location, and TRUE.
Referenced by run_get_location_loop().
static gboolean run_get_location_loop | ( | const gchar * | message | ) | [static] |
Definition at line 290 of file gui-misc.c.
References CrosshairType::AttachedBox, CrosshairType::AttachedLine, CrosshairType::AttachedObject, Crosshair, GHidPort::drawing_area, FALSE, ghid_hand_cursor(), ghid_interface_input_signals_connect(), ghid_interface_input_signals_disconnect(), ghid_interface_set_sensitive(), ghid_restore_cursor(), ghid_set_status_line_label(), ghid_status_line_set_text(), got_location, gport, loop, loop_button_press_cb(), loop_key_press_cb(), notify_crosshair_change(), AttachedBoxType::State, AttachedLineType::State, AttachedObjectType::State, STATE_FIRST, GHidPort::top_window, and TRUE.
Referenced by ghid_get_user_xy().
gboolean got_location [static] |
Definition at line 241 of file gui-misc.c.
Referenced by loop_key_press_cb(), and run_get_location_loop().
GdkCursorType oldCursor [static] |
Definition at line 56 of file gui-misc.c.
Referenced by ghid_hand_cursor(), ghid_point_cursor(), ghid_restore_cursor(), and ghid_watch_cursor().
GdkPixmap * XC_clock_mask |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().
GdkPixmap* XC_clock_source |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().
GdkPixmap * XC_hand_mask |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().
GdkPixmap * XC_hand_source |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().
GdkPixmap * XC_lock_mask |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().
GdkPixmap * XC_lock_source |
Definition at line 52 of file gui-misc.c.
Referenced by ghid_init_icons(), and gport_set_cursor().