← Back to team overview

kicad-developers team mailing list archive

Re: UIpolicies.txt [6 Attachments]


I added this so that developers wouldn't have to relearn what I had to
figure out the hard way. It's like section on the set focus to get the
escape key to cancel dialog bug in GTK.

I fear a minimum size is fraught with platform dependencies, some of which can only be known at runtime, due to font sizes, etc.

If done programmatically then the platform dependencies are minimized. The above sentence was in reference to trying to set the minimum while in wxformbuilder.

If to be done at runtime, and I feel this is the only sensible way, then maybe we need to start deriving all dialogs from our own common base class so we can take care of all these things in a common way.

If you could come up with a clean method of guaranteeing that anytime
the contents of a control was changed that the dialog got resized
correctly then yes it would make sense to create a base dialog class.

This criterion (of automatically being called after a resize) is unnecessary. Just having a member function to encapsulate the details of setting the minimum would be useful. But this can also be done in a non-member function.

Off the top of my head, I think this would be a very complex object and
would be difficult to integrate with wxFormBuilder.

No, wxformbuilder lets you derive your dialog from any base class you want. But I am not strongly advocating this member function at this time. An external function in common.c would be useful. If and when we ever want to do things accross all dialogs, such as supporting context sensitive help or printing dialog windows or whatever, then a common base dialog class is not hard and can be handled easily by wxformbuilder.


Follow ups