www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/14/06:42:46

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Tue, 14 Jul 2015 12:41:38 +0200 (CEST)
From: Roland Lutz <rlutz AT hedmen DOT org>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] The new to do
In-Reply-To: <mo1qk5$7tk$1@ger.gmane.org>
Message-ID: <alpine.DEB.2.11.1507141225570.2987@nimbus>
References: <CAM2RGhQ70Pex5aNeQ86vKHc7sKf_Vpws69__CPb2QKg6fJTeHg AT mail DOT gmail DOT com> <mnv04v$if0$1 AT ger DOT gmane DOT org> <0A5D410F-D1EF-4FC6-AF0F-BB13218B1615 AT icloud DOT com> <1436781099 DOT 960 DOT 7 DOT camel AT ssalewski DOT de> <mo1qk5$7tk$1 AT ger DOT gmane DOT org>
User-Agent: Alpine 2.11 (DEB 23 2013-08-11)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 14 Jul 2015, Kai-Martin Knaak wrote:
> Current gschem git head sort of has this. At least for symbols. You
> can select different symbols, type ee and the dialog presents all of
> the shared attributes.
> This comes handy for mass changes of attributes.

Xi has the complementary feature; when you select multiple objects, it 
shows all attributes (line width etc.) any of the selected objects has, 
but only shows a value if all objects have the same value.

If you want to implement this feature in your editor, you could consider 
using libxornstorage.  You don't have to use any Python to do so; it's a 
simple C/C++ library which provides elementary data access functions. 
For each built-in gEDA "attribute" like line width, text size, etc., it 
provides a triplet of functions:

void xornsch_get_text_size(
         xorn_revision_t rev, xorn_selection_t sel,
         xorn_attst_t *state_return, int *value_return);
int xornsch_set_text_size(
         xorn_revision_t rev, xorn_selection_t sel, int value);
xorn_selection_t xornsch_select_by_text_size(
         xorn_revision_t rev, int value);

The returned "state" tells you whether any of the objects have the 
attributes, and whether it is consistent:

xorn_attst_na
     None of the selected objects has this attribute.
     Don't show this attribute in the property editor.

xorn_attst_consistent
     All selected objects have the same value of this attribute.
     Show this value for this attribute in the property editor.

xorn_attst_inconsistent
     There are different values of this attribute between the
     selected objects.  Show this attribute in the property
     editor, but don't show a value.

For more information, see the libxornstorage documentation at 
http://hedmen.org/xorn/doc/api/html/xornstorage_8h_source.html

Roland

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019