It seems that the font module is not returning the correct size for the text. The iup*_font.c module is essential for a correct layout. Try different FONT attributes to see how this size difference behaves.
Best, Scuri On Tue, Aug 11, 2015 at 9:07 AM, Eric Wing <[email protected]> wrote: > On 8/4/15, Antonio Scuri <[email protected]> wrote: > > ok. I recommend a look at IupShow function code. > > > > Here is an inside look. > > > > When you show a dialog (IupShow/IupShowXY/IupPopup), the first thing it > > will do is to call IupMap, that will recursively created all the controls > > inside the dialog, by calling the Map method of the Iclass structure for > > each element. > > > > Then IupMap will call iupLayoutCompute, so the layout will be computed. > > This part is independent from the native system. This will > > call ComputeNaturalSize, SetChildrenCurrentSize and SetChildrenPosition > > methods. They are all independent of the native system. > > > > And right after, IupMap will call iupLayoutUpdate, this will call > > the LayoutUpdate method. This is where you update the native size and > > position of the control in the native system. > > > > This sequence, iupLayoutCompute + iupLayoutUpdate is also performed by > > IupRefresh if you need that an already mapped dialog has its layout > > updated. > > > > So everything is actually an automatic process. The native driver never > > worries about the layout, only about setting the size and the position of > > the control. > > > > The UTF-8 support can be left as it is for now, later we can understand > > it better. > > > > Best, > > Scuri > > > > Okay, I'm currently using iupdrvBaseLayoutUpdateMethod to be my layout > for everything. I have a very simple test consisting of a window and > label. > > int main(int argc, const char* argv[]) > { > IupOpen(&argc, &argv); > Ihandle* label = IupLabel("Hello"); > Ihandle* dialog = IupDialog(label); > IupShowXY(dialog, IUP_CENTER, IUP_CENTER); > > IupMainLoop(); > ... > } > > > My current problem is the label is getting clipped. > > When I step through iupdrvBaseLayoutUpdateMethod(), > ih->currentwidth is 26 and > ih->currentheight is 6 > > In Cocoa, the minimum dimensions to correctly show the label "Hello" are > 36x17. > > So if I take Iup's values and apply them, my label gets clipped > because the box is too small. > > What should I be doing here? > > > ------------------------------------------------------------------------------ > _______________________________________________ > Iup-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/iup-users > >
------------------------------------------------------------------------------
_______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users
