summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2006-11-29 02:17:34 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2006-11-29 02:17:34 +0000
commit084cbd56d1be03fd348ce0eedbebcbf7be05d94e (patch)
treeffa68cbd1f4dc58fcea109d9fd445170d39da9c5 /src/ui
parentNew widget helperclass for Gtk:Entry (diff)
downloadinkscape-084cbd56d1be03fd348ce0eedbebcbf7be05d94e.tar.gz
inkscape-084cbd56d1be03fd348ce0eedbebcbf7be05d94e.zip
'backup' commit. Added widgets to C++-find dialog. Work not finished.
(bzr r2052)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/find.cpp66
-rw-r--r--src/ui/dialog/find.h31
2 files changed, 79 insertions, 18 deletions
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp
index 5d559261f..85354ff6c 100644
--- a/src/ui/dialog/find.cpp
+++ b/src/ui/dialog/find.cpp
@@ -3,8 +3,9 @@
*
* Authors:
* Bryce W. Harrington <bryce@bryceharrington.org>
+ * Johan Engelen <goejendaagh@zonnet.nl>
*
- * Copyright (C) 2004, 2005 Authors
+ * Copyright (C) 2004-2006 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
@@ -22,18 +23,61 @@ namespace Dialog {
Find::Find()
: Dialog ("dialogs.find", SP_VERB_DIALOG_FIND),
- _page_find(1, 1)
+ _entry_text(_("_Text: "), _("Find objects by their text content (exact or partial match)")),
+ _entry_id(_("_ID: "), _("Find objects by the value of the id attribute (exact or partial match)")),
+ _entry_style(_("_Style: "), _("Find objects by the value of the style attribute (exact or partial match)")),
+ _entry_attribute(_("_Attribute: "), _("Find objects by the name of an attribute (exact or partial match)")),
+ _check_search_selection(_("Search in s_election"), _("Limit search to the current selection")),
+ _check_search_layer(_("Search in current _layer"), _("Limit search to the current layer")),
+ _check_include_hidden(_("Include _hidden"), _("Include hidden objects in search")),
+ _check_include_locked(_("Include l_ocked"), _("Include locked objects in search")),
+
+ _check_all(_("All types"), _("Search in all object types")),
+ _check_all_shapes(_("All shapes"), _("Search all shapes")),
+ _check_rects(_("Rectangles"), _("Search rectangles")),
+ _check_ellipses(_("Ellipses"), _("Search ellipses, arcs, circles")),
+ _check_stars(_("Stars"), _("Search stars and polygons")),
+ _check_spirals(_("Spirals"), _("Search spirals")),
+ _check_paths(_("Paths"), _("Search paths, lines, polylines")),
+ _check_texts(_("Texts"), _("Search text objects")),
+ _check_groups(_("Groups"), _("Search groups")),
+ _check_clones(_("Clones"), _("Search clones")),
+ _check_images(_("Images"), _("Search images")),
+ _check_offsets(_("Offsets"), _("Search offset objects")),
+
+ _button_clear(_("_Clear"), _("Clear values")),
+ _button_find(_("_Find"), _("Select objects matching all of the fields you filled in"))
{
// Top level vbox
Gtk::VBox *vbox = get_vbox();
vbox->set_spacing(4);
+
+ vbox->pack_start(_entry_text, true, true);
+ vbox->pack_start(_entry_id, true, true);
+ vbox->pack_start(_entry_style, true, true);
+ vbox->pack_start(_entry_attribute, true, true);
+
+ vbox->pack_start(_check_all, true, true);
+ vbox->pack_start(_check_all_shapes, true, true);
+ vbox->pack_start(_check_rects, true, true);
+ vbox->pack_start(_check_ellipses, true, true);
+ vbox->pack_start(_check_stars, true, true);
+ vbox->pack_start(_check_spirals, true, true);
+ vbox->pack_start(_check_paths, true, true);
+ vbox->pack_start(_check_texts, true, true);
+ vbox->pack_start(_check_groups, true, true);
+ vbox->pack_start(_check_clones, true, true);
+ vbox->pack_start(_check_images, true, true);
+ vbox->pack_start(_check_offsets, true, true);
- // Notebook for individual transformations
- vbox->pack_start(_notebook, true, true);
+ vbox->pack_start(_check_search_selection, true, true);
+ vbox->pack_start(_check_search_layer, true, true);
+ vbox->pack_start(_check_include_hidden, true, true);
+ vbox->pack_start(_check_include_locked, true, true);
- _notebook.append_page(_page_find, _("Find"));
+ vbox->pack_start(_button_clear, true, true);
+ vbox->pack_start(_button_find, true, true);
- // TODO: Insert widgets
show_all_children();
}
@@ -46,13 +90,3 @@ Find::~Find()
} // namespace UI
} // namespace Inkscape
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/ui/dialog/find.h b/src/ui/dialog/find.h
index 6d019b765..08a145707 100644
--- a/src/ui/dialog/find.h
+++ b/src/ui/dialog/find.h
@@ -17,6 +17,8 @@
#include "dialog.h"
#include "ui/widget/notebook-page.h"
+#include "ui/widget/button.h"
+#include "ui/widget/entry.h"
using namespace Inkscape::UI::Widget;
@@ -32,13 +34,38 @@ public:
static Find *create() { return new Find(); }
protected:
- Gtk::Notebook _notebook;
+ // Widgets:
+ Entry _entry_text;
+ Entry _entry_id;
+ Entry _entry_style;
+ Entry _entry_attribute;
- NotebookPage _page_find;
+ CheckButton _check_search_selection;
+ CheckButton _check_search_layer;
+ CheckButton _check_include_hidden;
+ CheckButton _check_include_locked;
+
+ // Type checkbutton widgets...
+ CheckButton _check_all;
+ CheckButton _check_all_shapes;
+ CheckButton _check_rects;
+ CheckButton _check_ellipses;
+ CheckButton _check_stars;
+ CheckButton _check_spirals;
+ CheckButton _check_paths;
+ CheckButton _check_texts;
+ CheckButton _check_groups;
+ CheckButton _check_clones;
+ CheckButton _check_images;
+ CheckButton _check_offsets;
+
private:
Find(Find const &d);
Find& operator=(Find const &d);
+
+ Button _button_clear;
+ Button _button_find;
};
} // namespace Dialog