diff options
| author | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-06-18 13:14:09 +0000 |
|---|---|---|
| committer | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-06-18 13:14:09 +0000 |
| commit | 74651351d05898e961941e98ad68043028ce3a87 (patch) | |
| tree | 712604789db98b301c7d23a0182aee356b850c15 /src/templates/statictemplateloadtab.cpp | |
| parent | Fix layer selection so defs don't change layers, updated symbol text. (diff) | |
| download | inkscape-74651351d05898e961941e98ad68043028ce3a87.tar.gz inkscape-74651351d05898e961941e98ad68043028ce3a87.zip | |
First newFromTemplate commit. Some basic widgets mechanics
(bzr r12379.2.1)
Diffstat (limited to 'src/templates/statictemplateloadtab.cpp')
| -rw-r--r-- | src/templates/statictemplateloadtab.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/templates/statictemplateloadtab.cpp b/src/templates/statictemplateloadtab.cpp new file mode 100644 index 000000000..b82338f16 --- /dev/null +++ b/src/templates/statictemplateloadtab.cpp @@ -0,0 +1,42 @@ +#include <gtkmm/alignment.h> +#include <gtkmm/button.h> +#include <gtkmm/label.h> +#include <iostream> + +#include "statictemplateloadtab.h" + + +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); +} + |
