1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * \file gschem_selection_adapter.h
26 /* Returned by properties when there are no items selected
28 #define NO_SELECTION (-1)
30 /* Returned by properties when there are multiple values in the selection
32 #define MULTIPLE_VALUES (-2)
36 #define GSCHEM_TYPE_SELECTION_ADAPTER (gschem_selection_adapter_get_type())
37 #define GSCHEM_SELECTION_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSCHEM_TYPE_SELECTION_ADAPTER, GschemSelectionAdapter))
38 #define GSCHEM_SELECTION_ADAPTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSCHEM_TYPE_SELECTION_ADAPTER, GschemSelectionAdapterClass))
39 #define GSCHEM_IS_SELECTION_ADAPTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSCHEM_TYPE_SELECTION_ADAPTER))
40 #define GSCHEM_SELECTION_ADAPTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSCHEM_TYPE_SELECTION_ADAPTER, GschemSelectionAdapterClass))
42 typedef struct _GschemSelectionAdapterClass GschemSelectionAdapterClass
;
43 typedef struct _GschemSelectionAdapter GschemSelectionAdapter
;
45 struct _GschemSelectionAdapterClass
47 GObjectClass parent_class
;
50 struct _GschemSelectionAdapter
59 gschem_selection_adapter_get_type();
62 gschem_selection_adapter_get_cap_style (GschemSelectionAdapter
*adapter
);
65 gschem_selection_adapter_get_dash_length (GschemSelectionAdapter
*adapter
);
68 gschem_selection_adapter_get_dash_space (GschemSelectionAdapter
*adapter
);
71 gschem_selection_adapter_get_fill_angle1 (GschemSelectionAdapter
*adapter
);
74 gschem_selection_adapter_get_fill_angle2 (GschemSelectionAdapter
*adapter
);
77 gschem_selection_adapter_get_fill_pitch1 (GschemSelectionAdapter
*adapter
);
80 gschem_selection_adapter_get_fill_pitch2 (GschemSelectionAdapter
*adapter
);
83 gschem_selection_adapter_get_fill_type (GschemSelectionAdapter
*adapter
);
86 gschem_selection_adapter_get_fill_width (GschemSelectionAdapter
*adapter
);
89 gschem_selection_adapter_get_line_type (GschemSelectionAdapter
*adapter
);
92 gschem_selection_adapter_get_line_width (GschemSelectionAdapter
*adapter
);
95 gschem_selection_adapter_get_object_color (GschemSelectionAdapter
*adapter
);
98 gschem_selection_adapter_get_pin_type (GschemSelectionAdapter
*adapter
);
101 gschem_selection_adapter_get_selection (GschemSelectionAdapter
*adapter
);
104 gschem_selection_adapter_get_text_alignment (GschemSelectionAdapter
*adapter
);
107 gschem_selection_adapter_get_text_color (GschemSelectionAdapter
*adapter
);
110 gschem_selection_adapter_get_text_rotation (GschemSelectionAdapter
*adapter
);
113 gschem_selection_adapter_get_text_size (GschemSelectionAdapter
*adapter
);
116 gschem_selection_adapter_get_text_string (GschemSelectionAdapter
*adapter
);
119 gschem_selection_adapter_get_toplevel (GschemSelectionAdapter
*adapter
);
121 GschemSelectionAdapter
*
122 gschem_selection_adapter_new ();
125 gschem_selection_adapter_set_cap_style (GschemSelectionAdapter
*adapter
, int cap_style
);
128 gschem_selection_adapter_set_dash_length (GschemSelectionAdapter
*adapter
, int dash_length
);
131 gschem_selection_adapter_set_dash_space (GschemSelectionAdapter
*adapter
, int dash_space
);
134 gschem_selection_adapter_set_fill_angle1 (GschemSelectionAdapter
*adapter
, int angle
);
137 gschem_selection_adapter_set_fill_angle2 (GschemSelectionAdapter
*adapter
, int angle
);
140 gschem_selection_adapter_set_fill_pitch1 (GschemSelectionAdapter
*adapter
, int pitch
);
143 gschem_selection_adapter_set_fill_pitch2 (GschemSelectionAdapter
*adapter
, int pitch
);
146 gschem_selection_adapter_set_fill_type (GschemSelectionAdapter
*adapter
, int line_type
);
149 gschem_selection_adapter_set_fill_width (GschemSelectionAdapter
*adapter
, int line_width
);
152 gschem_selection_adapter_set_line_type (GschemSelectionAdapter
*adapter
, int line_type
);
155 gschem_selection_adapter_set_line_width (GschemSelectionAdapter
*adapter
, int line_width
);
158 gschem_selection_adapter_set_object_color (GschemSelectionAdapter
*adapter
, int color
);
161 gschem_selection_adapter_set_pin_type (GschemSelectionAdapter
*adapter
, int type
);
164 gschem_selection_adapter_set_selection (GschemSelectionAdapter
*adapter
, SELECTION
*selection
);
167 gschem_selection_adapter_set_text_color (GschemSelectionAdapter
*adapter
, int color
);
170 gschem_selection_adapter_set_text_alignment (GschemSelectionAdapter
*adapter
, int alignment
);
173 gschem_selection_adapter_set_text_rotation (GschemSelectionAdapter
*adapter
, int angle
);
176 gschem_selection_adapter_set_text_size (GschemSelectionAdapter
*adapter
, int size
);
179 gschem_selection_adapter_set_text_string (GschemSelectionAdapter
*adapter
, const char *string
, GschemToplevel
*w_current
);
182 gschem_selection_adapter_set_toplevel (GschemSelectionAdapter
*adapter
, TOPLEVEL
*toplevel
);