summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2014-03-01 19:14:27 (GMT)
committeralbert-github <albert.tests@gmail.com>2014-03-01 19:14:27 (GMT)
commit025cc9def72002d4ab6da7bfee8a73c03ca7c331 (patch)
tree1a754c36c7a2fffb04cfb1c989532d0383147307 /src
parent8eeaae0b06fd320745f22efe176e0f19d6c8e2a6 (diff)
downloadDoxygen-025cc9def72002d4ab6da7bfee8a73c03ca7c331.zip
Doxygen-025cc9def72002d4ab6da7bfee8a73c03ca7c331.tar.gz
Doxygen-025cc9def72002d4ab6da7bfee8a73c03ca7c331.tar.bz2
Extension in config.xml if type=string with format=image
In case of a project logo a preview is shown in the "wizard mode". In "expert mode" only the name is shown. In this patch the config.xml the type=string possibilities are extended with format=image (config.xml, configgen.py, config.h). The doxywizard has been extended so that in "expert mode" this type is supported and that a preview is given (expert.cpp, inputstring.cpp and inputstring.h), furthermore in wizard.cpp a minimum label size has been defined to prevent jumping of the items in case of switching between a message text and an icon.
Diffstat (limited to 'src')
-rw-r--r--src/config.h2
-rw-r--r--src/config.xml2
-rwxr-xr-xsrc/configgen.py30
3 files changed, 32 insertions, 2 deletions
diff --git a/src/config.h b/src/config.h
index 756e94e..505e4d1 100644
--- a/src/config.h
+++ b/src/config.h
@@ -165,7 +165,7 @@ class ConfigEnum : public ConfigOption
class ConfigString : public ConfigOption
{
public:
- enum WidgetType { String, File, Dir };
+ enum WidgetType { String, File, Dir, Image };
ConfigString(const char *name,const char *doc)
: ConfigOption(O_String)
{
diff --git a/src/config.xml b/src/config.xml
index dcaa372..636b6e3 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -247,7 +247,7 @@ Go to the <a href="commands.html">next</a> section or return to the
</docs>
</option>
- <option type='string' id='PROJECT_LOGO' format='file' defval=''>
+ <option type='string' id='PROJECT_LOGO' format='image' defval=''>
<docs>
<![CDATA[
With the \c PROJECT_LOGO tag one can specify an logo or icon that is
diff --git a/src/configgen.py b/src/configgen.py
index 4023930..8ec0caa 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -201,6 +201,19 @@ def prepCDocs(node):
else:
if abspath == '1':
doc += "<br/>The file has to be specified with full path."
+ elif file =='image':
+ abspath = node.getAttribute('abspath')
+ if defval != '':
+ if abspath != '1':
+ doc += "<br/>The default image is: <code>%s</code>." % (
+ defval)
+ else:
+ doc += "<br/>%s: %s%s%s." % (
+ "The default image (with absolute path) is",
+ "<code>",defval,"</code>")
+ else:
+ if abspath == '1':
+ doc += "<br/>The image has to be specified with full path."
else: # format == 'string':
if defval != '':
doc += "<br/>The default value is: <code>%s</code>." % (
@@ -262,6 +275,8 @@ def parseOption(node):
print " cs->setDefaultValue(\"%s\");" % (defval)
if format == 'file':
print " cs->setWidgetType(ConfigString::File);"
+ elif format == 'image':
+ print " cs->setWidgetType(ConfigString::Image);"
elif format == 'dir':
print " cs->setWidgetType(ConfigString::Dir);"
if depends != '':
@@ -453,6 +468,21 @@ def parseOptionDoc(node, first):
if abspath == '1':
print ""
print "The file has to be specified with full path."
+ elif file =='image':
+ abspath = node.getAttribute('abspath')
+ if defval != '':
+ print ""
+ if abspath != '1':
+ print "The default image is: <code>%s</code>." % (
+ defval)
+ else:
+ print "%s: %s%s%s." % (
+ "The default image (with absolute path) is",
+ "<code>",defval,"</code>")
+ else:
+ if abspath == '1':
+ print ""
+ print "The image has to be specified with full path."
else: # format == 'string':
if defval != '':
print ""