summaryrefslogtreecommitdiffstats
path: root/src/templates/static-template-load-tab.cpp
diff options
context:
space:
mode:
authorSlagvi Public <JandotDarowskiattgmaildottcom>2013-06-22 13:22:37 +0000
committerSlagvi Public <JandotDarowskiattgmaildottcom>2013-06-22 13:22:37 +0000
commit0d0e1eac78d0ae118041022c43e94901cef1b5e8 (patch)
tree6deaef8ac4353a946524915874b972028945cdbb /src/templates/static-template-load-tab.cpp
parentFirst newFromTemplate commit. Some basic widgets mechanics (diff)
downloadinkscape-0d0e1eac78d0ae118041022c43e94901cef1b5e8.tar.gz
inkscape-0d0e1eac78d0ae118041022c43e94901cef1b5e8.zip
Coding style fixes
(bzr r12379.2.2)
Diffstat (limited to 'src/templates/static-template-load-tab.cpp')
-rw-r--r--src/templates/static-template-load-tab.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/templates/static-template-load-tab.cpp b/src/templates/static-template-load-tab.cpp
new file mode 100644
index 000000000..e71b9dede
--- /dev/null
+++ b/src/templates/static-template-load-tab.cpp
@@ -0,0 +1,47 @@
+#include <gtkmm/alignment.h>
+#include <gtkmm/button.h>
+#include <gtkmm/label.h>
+#include <iostream>
+
+#include "static-template-load-tab.h"
+
+namespace Inkscape {
+namespace UI {
+
+
+StaticTemplateLoadTab::StaticTemplateLoadTab() :
+ _moreInfoButton("More info"),
+ _previewImage("preview.png"),
+ _shortDescriptionLabel("Short description - I like trains. ad asda asd asdweqe gdfg"),
+ _templateNameLabel("Template_name"),
+ _templateAuthorLabel("by template_author")
+{
+ _templateInfoColumn.pack_start(_templateNameLabel, Gtk::PACK_SHRINK, 4);
+ _templateInfoColumn.pack_start(_templateAuthorLabel, Gtk::PACK_SHRINK, 0);
+ _templateInfoColumn.pack_start(_previewImage, Gtk::PACK_SHRINK, 15);
+ _templateInfoColumn.pack_start(_shortDescriptionLabel, Gtk::PACK_SHRINK, 4);
+
+ _shortDescriptionLabel.set_line_wrap(true);
+ _shortDescriptionLabel.set_size_request(200);
+
+ Gtk::Alignment *align;
+ align = manage(new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER, 0.0, 0.0));
+ _templateInfoColumn.pack_start(*align, Gtk::PACK_SHRINK, 5);
+ align->add(_moreInfoButton);
+}
+
+
+void StaticTemplateLoadTab::createTemplate()
+{
+ std::cout << "Static template\n";
+}
+
+
+void StaticTemplateLoadTab::_displayTemplateInfo()
+{
+ TemplateLoadTab::_displayTemplateInfo();
+ _templateNameLabel.set_text(_currentTemplate);
+}
+
+}
+}