diff options
| author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-06-17 16:20:42 +0000 | 
|---|---|---|
| committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-06-17 16:20:42 +0000 | 
| commit | 64a96164b0a793c8f6dd9f204018ebb54d0e025e (patch) | |
| tree | d22221207ffa74d1659df4103a505b534d0c2f15 /src/PSEditModel.cxx | |
| parent | 23a117d4bed517b0cba4539355706f5221fe9a65 (diff) | |
initial color support 
initial color support
Diffstat (limited to 'src/PSEditModel.cxx')
| -rw-r--r-- | src/PSEditModel.cxx | 24 | 
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; | 
