By tweaking the variables in this section, you can change the general
appearance of Adime's dialogs.
If you want the dialog to be displayed on a certain video bitmap other
than `screen', set this to point to that bitmap. This is particulary
useful if you for some reason have scrolled away from the top left area
of the video memory and want the dialog to be displayed on currently
visible video memory rather than on the default location. If this is NULL
(it is by default), `adime_dialogf()' & co will scroll to the top left
corner of screen and use that part to display the dialog on.
The font used in general by Adime dialogs and objects, the font for the
title of the dialogs and the font for the OK and Cancel buttons. If one
of them is NULL (they all are by default), Allegro's `font' will be used.
Flag indicating whether or not Adime dialogs should call Allegro's
function `yield_timeslice()' continuously when it has nothing better to
do. Default is `TRUE'. This flag has no effect while the file selector is
open: `yield_timeslice()' will always be called then.
Flag indicating whether or not Adime dialogs should restore the screen
after they have been closed. Default is `TRUE', indicating that the screen
should be restored.
Flag indicating whether the background window of Adime dialogs should be
drawn. Default is `TRUE', indicating it should be drawn.
void (*adime_callback)(DIALOG *d)
If you set this to something else than `NULL', then that function will be
called continuously as long as a Adime dialog is open. The argument `d'
will point to the first object of the current Adime dialog, or the first
object of Allegro's file selector when it's open. See
adime/examples/exanim.c for an example on how to use this to do animation
while a dialog is open.
These variables specify the color of different parts of the dialog shown
by `adime_dialogf()'. You may change them if you want other colors (the
default is similar to the windows gray semi-3d look). Each r, g, and b
component ranges from 0 to 255 no matter which the current color depth is.
In 8 bit modes the closest entry in the palette is found, so it is your
responsibility to make sure that the palette contains similar colors. As
a special case, if you set the `filler' field of the RGB struct to 1
rather than 0, then the `r' field will be used without searching the
palette. (This can be useful if you depend on a certain palette index to
Most of the variable names should be pretty self-explanatory.
`adime_disabled_text_rgb' is very seldom used and is the color of text on
buttons that can't be pressed. `adime_error_text_rgb' is the color of the
result of an expression if the expression was invalid (e.g. contained
mismatched parentheses). Hopefully you will understand the other names,
but if you don't, they are common enough that you should be able to find
out with some trial and error.
These variables specify the size and spacing of different parts of Adime
dialogs. `border_thickness' is the spacing from the border to the
contents of the dialog; `title_spacing' is the spacing between the title
and the first object; `button_spacing' is the spacing above the OK and
Cancel buttons; `between_button_spacing' is the spacing between the
buttons; `description_spacing' is the horizontal spacing between the
description text and the input field; `line_spacing' is the vertical
spacing between two objects in the dialog; `button_w' and `button_h'
specify the size of the OK and Cancel buttons; `title_border_thickness' is
the space between the dialog title and the edge of the dialog;
`title_internal_border_thickness' is the space inside the title from the
edge to the text.
Of these variables, only the `adime_window_title_*' ones affect the file
Back to Contents