Search code examples
iup

IUP, font inheritance, visual styles and other


By advancing with IUP I came to several questions.

In have idea to give my user ability to change font size of my dialogs in order to change dialog's font size and so make him a dialog better readable without glasses :) As far I can see IUP can do this, but here is additional problem. I uses default font for all controls except for IUPtree where I need fixed width font like is Courier because of aligning data in "columns".

1) Can I somehow change a font face for tree but leave font size to be inheritable from dialog so when I change font size from dialog that tree take this size but with tree's font face?

2) I save IUP, CD, IM libraries to my root (C:) and put paths C:\iup\iup, C:\iup\cd, C:\iup\im to system path. I can use those libraries in all programs but I can't get "visual styles". I try to setup myexe.manifest manually but no success. How to easiest get "visual styles" in described situation for my IUP/C programs?

3) I make matrix as virtual grid which show data from file and I would need separate scrollbar to manage a "view" of that matrix. Since we havent scrollbar I use IUPval control which do a job. Separate scrollbars are mented in documentation as controll which will came soon to IUP collection. So, roughly, when can we expect scrollbar, statusbar and utf-8 version of IUP toolkit?


Solution

  • 1) IupSetfAttribute(ih, "FONT", "Courier, %s", IupGetAttribute(ih, "FONTSIZE"));

    2) Visual Styles are independent from those paths. What really count is the manifest file. I don't have experience on using an external manifest. The IUP Win32 driver documentation orients you how to add a manifest to the executable project inside a RC file. It is quite simple. See the iup/etc/iup.rc file for a sample.]

    3) There is no time frame for those features, except for UTF-8. Because it is a very requested feature we will try to include it in our 3.9 version.

    IupMatrix can operate in callback mode. This means that its cells cab be filled by request when they are scrolled to display. It seems to be very much like you need. You store the cells values in an application dynamic structure and when the callback is called you check if the requested cells must be loaded form file. And if you want to save memory, some how you can discard cell values that are not being used.