patch for textbox beginnings
Timmy Douglas
timmy+slate at cc.gatech.edu
Wed May 31 19:16:26 PDT 2006
* textbox beginnings
In this patch I write a generic (untested, but compiles) interface
for textbuffers and then I fill out an example one that is based on
an array of arrays. I extended the Command object for textbuffer
manipulations so when things need to modify a textbuffer, they can
group a bunch of commands in a recording and then execute them at
once. Those can then be replayed with #undo to undo the changes. But
where should I store these recordings so that they can be played
back and stuff? I created a file called focus.slate for the
beginnings of a way to determine what morphs have focus and I think
I'll try to figure out in there a way that user keyboard input is
redirected to the right components. But I'm not really sure how I
should design that. Right now nothing is getting keypresses, so the
textbox in the ui.slate file is pretty much a dud.
I also did some cleaning in listbox.slate and put the behavior in
scrollpane where it belongs. Perhaps in the future I can make it so
scrollpanes don't crash and burn in the drawing method when the
scrollbars are nil.
I also started a file called fundamental-mode. This would ideally be a
command list that takes basic key presses and sends the
textbuffercommands to the buffer. Right now though I have no idea how
the defined CommandMap is supposed to work (it's a dictionary but what
maps to what? what does translators do? what kind of object is an
accelerator? etc)
The next step would be figuring out how to send the keypresses to the
right morph and deciding how that should be done. Maybe someone can
give me an idea here.
Then I need to figure out how the CommandMaps should work, where the
command message/undo rings should be placed, and then we'd probably
have a functional textbox.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timmy5.dpatch
Type: application/octet-stream
Size: 44957 bytes
Desc: not available
Url : /archives/slate/attachments/20060531/ada2ae09/timmy5-0001.obj
More information about the Slate
mailing list