Menu

#14 eve issue

open
None
5
2008-05-14
2008-05-14
Ruslan
No

Platform - Windows Vista 32 SP1. Compiler - VC++ 2008 Express Edition. Manually builded Boost.

I have for example eve definition:
layout some_containers
{
view dialog(name: "MyDialog", grow:true)
{
button(name: "someButton", horizontal:align_left, vertical:align_center)
{
}
button(name: "someButton", horizontal:align_right, vertical:align_center)
{
}
button(name: "someButton2", horizontal:align_fill, vertical:align_fill)
{
}
}
}

Why this eve layout is not working(Eve engine throws some exception)?
As I understand I can't use align_right in horizontal alignment for second button. If I change it to align_left it works fine.
In Begin I don't receive exception or some errors. Nothing happens when I try to update the window. Only Eve engine throw some exception.

Is this bug or it was planned before that in layout like this we can't use aling_right?

Discussion

  • Sean Parent

    Sean Parent - 2008-05-14

    Logged In: YES
    user_id=1227609
    Originator: NO

    The particular exception is a logic_error and should report "Right align item before other item." -

    If you have a particular effect you are trying to achieve please send a description or sketch - I don't know of any cases that can't be worked around by nesting items in a row() or column().

    Generally items which are align_left should be on the left - and align_right should be on the right - (and same for top/bottom for vertical). The solver is a little more lax with items which are not left before a left item than it is with right items - I haven't yet decided if right should be like left or vise-versa.

    Internally - fill is currently either fill_forward or fill_reverse (this has to do with how the container grows with respect to it's guides) - that further complicates the issue as in this example you could have symmetry if you could specify that the third button was align_fill_reverse - but currently we just default fill to fill_forward (unless the layout is reversed for RTL languages).

    If you look at the align_reverse example you can see many examples using guides with both left and right aligned elements - the ability to have both left and right aligned guides in the same layout was done for Acrobat 8 which required a mix of LTR and RTL languages within a single layout.

     
  • Sean Parent

    Sean Parent - 2008-05-14
    • assigned_to: nobody --> sean_parent
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.