SEAL Forum Index SEAL
The SEAL Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Window and window control planning

 
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development
View previous topic :: View next topic  
Author Message
orudge
Administrator


Joined: 07 Oct 2001
Posts: 1332
Location: United Kingdom

PostPosted: Thu Jun 13, 2002 12:51 pm    Post subject: Window and window control planning Reply with quote

This thread is for planning window functions and also controls - eg, the API for buttons, combo boxes, and so on.
_________________
Owen Rudge
http://www.owenrudge.net/

Currently Playing (last time I was online, anyway):
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
WinstonEwert



Joined: 11 Jun 2002
Posts: 27
Location: Bug Land

PostPosted: Mon Jun 17, 2002 8:36 pm    Post subject: Reply with quote

I suppose it makes the most sense to use the familir system.

I.E. where everything is windows/view/object/whatever you want to call it.
Each view can have subviews, which can have subviews in themselves.
Back to top
View user's profile Send private message
WinstonEwert



Joined: 11 Jun 2002
Posts: 27
Location: Bug Land

PostPosted: Mon Jun 24, 2002 12:50 pm    Post subject: Reply with quote

How About:

class View
{
draw();
click();
msg();
int x,y,width,height;
vector<view *> children;
view * parent;
};

class SealButton : public View
{
draw();
click()
{
parent->msg(i was clicked);
}

};


Each control would look in the registery for information on how to draw itself for skins. A link type thing could be created so that /themes/current/ would always get you into the current theme in the registry.
Back to top
View user's profile Send private message
_xduffy_
Administrator


Joined: 15 Mar 2002
Posts: 894
Location: Sweden

PostPosted: Sat Jun 29, 2002 3:52 am    Post subject: Reply with quote

But I don't think the view should have a method called click... That should be part of the msg() method... you send a message which contain a mouse click...

And surely we need more methods for view... just look in our current t_view object in Seal 2.x... some more..
_________________
http://xduffystuff.sourceforge.net/Desktop/
www.xduffy.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
llogiq



Joined: 05 Jul 2002
Posts: 52
Location: Germany

PostPosted: Tue Jul 09, 2002 12:28 pm    Post subject: Reply with quote

_xduffy_ wrote:
But I don't think the view should have a method called click... That should be part of the msg() method... you send a message which contain a mouse click...

This msg() method is pretty general, and may add too much overhead if all we want is to know if there was a mouse click. Compare
Code:
myButton.click() { ... }
to
Code:
myButton.msg(Message *msg) { switch (msg->type) ... }

and appreciate the marvel of a well-defined and not-too-general API. The second version has also the problem that the type of a message has to be defined in one place, which further complicates things.

The callback methods should probably reflect the ECMAscript (some know it as JavaScript) or Java event model, as it is fairly complete (a "drag" function misses, however, AFAIK). Custom message handlers can be implemented the same way:
Code:
myButton.myHandler() { ... }
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SEAL Forum Index -> Seal 3.0 Development All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group