Support for custom colors in output
Free documentation system for Delphi / Pascal with JavaDoc support.
Status: Beta
Brought to you by:
trident
SYMPTOM OF PROBLEM: <describe the="" symptom="">
Enhancement.
DETAILED DESCRIPTION: <describe the="" circumstances="">
It would be really nice, if user could pick different
colors for HTML output. Currently there are four colors
in program:
- header & footer (LIGHT BLUE)
- class names (BLUE)
- description (PURPLE)
- background for description (LIGHT YELLOW)
If this support would be implemented, user could choose
different color for each of the above mentioned groups.
By default, current colors would be picked to minimize
user confusion.
br
krokoslav@yahoo.es
Anonymous
Logged In: YES
user_id=248829
In fact, I don't know how to implement this customization :
1/ The user can provide an external css file
2/ In the user interface, let choose the color and/or style of
output.
I prefer the first one, but it require more knowledge, but you
must be a programmer no ?
So, I really don't know how to implement it.
It will not be added in next release, but the second one
surely, once I found the "how" !
Logged In: NO
I really don't know how HTML output is made. But I assume
that each source file is dragged in some method or class,
where its contents are translated and HTML output is generated.
Obviously default colors must be included somewhere in this
algorihtm. If user would change color in GUI for example
header & footer from LIGHT BLUE to GREEN, some internal
member would be change:
delphi example:
TColorPallete = class
private
fHeaderAndFooterColor: string;
fClassNamesColor: string;
fDescription: string;
fBackgroundColor: string;
public
property HeaderAndFooterColor: string
read fHeaderAndFooterColor write fHeaderAndFooterColor;
property ClassNamesColor: string
read fClassNamesColor write fClassNamesColor;
property DescriptionColor: string
read fDescriptionColor write fDescriptionColor;
property BackgroundColor: string
read fBackgroundColor write fBackgroundColor;
end;
const
BLUE = '#00FF00'; //dummy value (i don't know color codes)
PURPLE = '#0000FF'; //dummy value
YELLOW = '#00FFFF'; //dummy value
GREEN = '#FF0000'; //dumy value
constructor TColorPallete.Create();
begin
fHeaderAndFooterColor:= BLUE;
fClassNamesColor:= BLUE;
fDescription:= PURPLE;
fBackgroundColor:= YELLOW;
end;
Setting color for HeaderAndFooter:
procedure TMainForm.ChangeHeaderAndFooterColor;
begin
fColorPallete.BackgroundColor := GREEN;
end;
So where ever algorithm inserts current constant values for
"background" color, just replace this with
ColorPallete.BackgroundColor.
function TSomeClass.CreateHTMLOutput: string;
begin
result := "<html>" +
"<body bgcolor=" + fColorPallete.BackgroundColor + ">" +
...
"</body>" +
"</html>";
end;
I must repeat that I really don't know how source code looks
like and if this approach is possible, but when I
implemented Gant diagrams with final HTML output I used
exactly the same approach.
br
Gaber
krokoslav@yahoo.es