Ok, the relative location allows you to set where on the bit set in
"relative to bit name" to start from.
for example, in the exmms.bits.db, I wanted the button to be at the
bottom in the middle, but centered as a group, no matter how wide the
epplet was, so i set the pause button's settings at:
top-left:
pixel loc: 0, -12
(no relative bit name - make it relative to the entire thing)
Relative loc: 0, 1
Pre-Adjust: 0,0
the bottom-right at:
pixel loc: -1, -1
Rel. Loc: 1, 1
and size:
min: 7,9; max: 7,9;
and misc:
content alignment: h: .5, v: 0;
this makes the button's top be 12 pixels above the bottom of the bit.
The relative location is which part of the Relative bit name to start
at. 0 being top and left, 1 being bottom and right, and .5 being the
middle.
Normally, bits stretch from their top left to bottom right, but since i
set the size to a fixed value, it is placed between its extents based on
the misc settings. .5 puts it in the middle horizontally, and 0 puts it
at the top vertically (its top the vertical part of the top-left no
matter where the bottom right is.)
The other buttons were then placed with set sizes and locations relative
to the puase button.
Stop's top-left is 2,0 relative to pause, with rel. loc: 1, 0.
This makes it 2 pixes right of the right side of Pause, and 0 pixels
down from the top of pause. The bottom right is -1, -1 from the entire
bit's bottom right corner, but once again i set the size, and made the
content alignment 0,0, so it stays in its upper left corner.
Now, for events. In ebits, if you want the geometry of a bit, you use
its Name and ebits_get_named_bit_geometry(). For callbacks you use its
Class and ebits_set_classed_bit_callback().
I would recommend running glade on the etcher.glade file in the etcher
tree, double clicking filesel clicking on the properties tab, and then
the Class pulldown's text box, and setting editable to "Yes" and then
clicking build, and then rebuilding etcher. This allows you to set the
class of a bit to something other than the defaults that raster set in
there. (can someone with cvs access fix this?)
Hope that helps.
i guess i'll start thinking about writing etcher docs///
--
brian
On Mon, Oct 29, 2001 at 04:08:30AM -0600, Brendon Davidson wrote:
> I think I've figured out mostly how ebits work and what etcher is used
> for. There is at least one thing in etcher, however, that I'm still
> confused about. What are 'Relative Location' and 'Relative Pre-Adjust'
> for? Now that I think of it, there is another thing confusing me. In
> etcher, one can specify what a particular bit looks like in a certain
> state. One of the available states is clicked. So, I understand how to
> make an ebit appear clicked, but how do I connect code to it's click
> event? For example, if I were to create a button as a bit in an ebits
> db, and give it different images for each of its states, when I then go
> to display it, i'll be able to click it and watch its image change. But
> how would I define what function the button actually invokes when
> clicked?
>
> Clarification desired and appreciated :)
>
> Thanks,
> Brendon
>
>
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@...
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
----- End forwarded message -----
|