summaryrefslogtreecommitdiff
path: root/src/PSEditModel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PSEditModel.cxx')
-rw-r--r--src/PSEditModel.cxx24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/PSEditModel.cxx b/src/PSEditModel.cxx
index 8792414..e0028ce 100644
--- a/src/PSEditModel.cxx
+++ b/src/PSEditModel.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditModel.cxx,v 1.13 2005/02/28 17:56:51 hofmann Exp $"
+// "$Id: PSEditModel.cxx,v 1.14 2005/06/17 18:20:42 hofmann Exp $"
//
// PSEditWidget routines.
//
@@ -79,10 +79,11 @@ void PSEditModel::clear() {
}
}
-void PSEditModel::new_text(int x1, int y1, const char *s, int size, int p) {
+void PSEditModel::new_text(int x1, int y1, const char *s,
+ int size, int p, PSEditColor *c) {
set_page(p);
- cur_text = new PSEditText(x1, y1, s, size);
+ cur_text = new PSEditText(x1, y1, s, size, c);
if (text[p]) {
text[p]->append(cur_text);
} else {
@@ -169,6 +170,23 @@ int PSEditModel::get_size() {
}
}
+void PSEditModel::set_color(PSEditColor *c) {
+ if (cur_text) {
+ cur_text->text_color.set(c->r, c->g, c->b);
+ }
+}
+
+int PSEditModel::get_color(PSEditColor *c) {
+ if (cur_text) {
+ c->set(cur_text->text_color.r,
+ cur_text->text_color.g,
+ cur_text->text_color.b);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
int PSEditModel::get_max_pages() {
return max_pages;