Re: Re: Edit Box/Text Area Selection API

Darren Vincent Hart <[email protected]> Thu, 09 Oct 2003 08:15:34 -0600
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <1065708934.21795.32.camel@sway>
On Thu, 2003-10-09 at 05:45, Marc Strämke wrote:
> Christopher Slade wrote:
> > I just wanted to pass the API I had in mind for selecting text in an
> > edit box or text area
> > 
> > 
> > To set the text
> > void selection(int start, int end)
> > 
> > To get the current selection
> > int selection_start()
> > int selection_end()
> The obvious alternative would be to return a std::pair or a boost 
> touple, seems "righter" to me *g*

This would be all the more correct if we stored the selection in a
std::pair... let's look into that.

> > 
> > And also to get the currently selected text
> > 
> > std:wstring selection()
> This is a bit confusing imo, selected_text() or something like that 
> seems better.
> > (which will return nothing if nothing is selected)
> > 
> > Let me know what you think.
> > Thanks, Chris
> 
> 
> 
> _______________________________________________
> Libstk mailing list
> [email protected]
> http://www.dvhart.com/cgi-bin/mailman/listinfo/libstk