WWDC1997 Session 102

Transcript

Kind: captions
Language: en
good afternoon welcome to session 102
where you will learn about the evolution
of the Mac OS toolbox
please welcome part time Jedi Knight
full-time technical lead for the toolbox
ed Bo's the user experience of Mac OS 8
sets the new standard in ease of use for
personal computers this slide in a
second so some of them to look and feel
we've added the Mac OS 8 you're going to
find out just how easy it is to get this
look and feel in your applications and
take advantage a lot of lots of the new
toolbox features that we've actually
added so what's new and different in Mac
OS 8 well firstly we've added a new
manager called the appearance manager
this manager actually allows access to
patterns and colors to match the current
theme currently there's only one theme
if you will and that's the Platinum
appearance it also allows access for you
to use ap is to draw primitives what we
call primitive these primitives draw
things like placards window headers and
group box lines as was and visual
separators as well we've really revved
the control manager there is a lot of
new functionality in the control manager
basically now we have supports to do
things like control embedding as well as
live scrolling the dialog manager has
been significantly improved as well it
now supports things like theme
backgrounds and an approved dialog and
alert handling mechanism the window
manager we've made some additions
they're basically the window manager now
has the port for collapsing and some new
zoom variants the menu manager has been
enhanced as well now we have support for
contextual menus as well as extended
menu modifiers finally all these
features add up to a much richer
environment v2 programming
so what are the features and benefits to
you well the features obviously we have
the new grayscale look and we also have
much more powerful tool box managers to
program with benefits
well the biggest benefit is you get to
write less code we have a lot of new
functionality in here which will make
writing a Macintosh application a lot
easier and you'll see more of that as we
go on we also get to finally improve the
consistency of the interface with this
version of Mac OS 8 essentially we have
a lot of new controls that have
previously not existed in the toolbox
things like sliders tabs progress bars
things that you've probably written
before and now we actually supply them
and if enough of you actually get out
there and start using this stuff users
will actually start to see the same
elements in all applications and we'll
get back to that consistent look and
feel that we just have the other thing
the other good benefit of the of using
the new toolbox features is that it
actually sets your application up for
themes switchability
themes switching you may have seen theme
switching in previous WWDC sessions last
year the year before essentially a theme
is just a visual look that transcends
all elements of the user interface by
using all the new deaf pots that we
provide and all of the new api's that we
provide with Mac OS 8 your application
will actually take a huge step towards
theme switching
the pieces that make all this magic
happen are in two components the
appearance extension and the parents
control panel contextual menus are
actually held in a separate extension
the appearance extension holds all the
new controls that I'll be talking about
today as well as implementing all the
new ap is the control panel is more for
the user it allows the user to actually
change their system font it also allows
them to change their highlight color for
text as well as the accent color the
accent color is something new and what
it does is when you set your accent
color it actually affects things like
the menu highlighting progress bar
colors the sums of indicators and scroll
bars things like that it also rolls in
the window shade control panel so now
all your window collapsing options are
in the appearance control panel the most
important option in the appearance
control panel is system-wide appearance
by default in Mac OS 8 all applications
automatically receive the grayscale
appearance if the user goes into this
control panel and turns this checkbox
off essentially all applications except
the ones that directly adopt the new
features will go back to the classic
system 7 look so the finder which is a
full adopter of all these new appearance
widgets will remain in grayscale while
everything else goes back into system 7
this is strictly for compatibility only
it's not a form of beam switching the
appearance manager basically as I said
gives you all the colors and patterns
that you need to typically draw in
things like window headers you can get
the correct color for enabled and
disabled text you can get the background
colors of Windows things like that we
also have the primitives I mentioned
this earlier we have placards window
headers visual separators and future
versions will actually have more drawing
primitives for you to do basically it
will make it a lot easier to write
custom deaf props you'll be able to just
a draw me a menu background and we'll
take care of the work for you or throw
me a button background
will draw the button background you guys
can draw any type of content that you
would like on top of them the most
important API in this is registered and
unregistered parents client this API is
the most important API to learn when it
comes to adopting appearance just this
one call basically tells a system that
even when system-wide appearance is off
I want to receive grayscale and it does
this by automatically mapping def procs
going to get to that in one second so
like I said this is about probably the
easiest and quickest way to migrate your
applications to be deemed savvy and
appearance savvy and since we have all
these new def procs the classic def
crocs are now deprecated this is a good
visual visual picture of of how def
product mapping works i'm redundant
essentially we have this mapping layer
in the center this mapping layer
receives requests for all the classic
depth rocks such as w0 if you were to
ask for W thousand zero you were to
actually get our mapper WF and any call
to that we would redirect either to the
real W depth the real classics of you
depth or the new theme savvy W def if
system-wide appearance is on or you
register yourself as an appearance
client your going to go and through the
mapping layer to the new def procs all
if you had system-wide appearance off
and you didn't had an application that
wasn't an adopter you'd go the route to
get to the classic def process best
thing to do when adopting this stuff is
to adopt directly use the new def procs
directly which is represented by the
line on the right this eliminates all
the overhead of going through the
compatibility or mapping layer and as I
said the classic def box are going to go
away so this is what the picture will
look like in the future the macula state
control manager has a lot of new
features these are just a few and we're
going to get into them basically in the
past
CNET messages there are about 12 to give
you an idea of just the just give you an
idea of the extent of the additions that
we've done we've added 14 new messages
to do things like you see here controls
now have the ability to specify what
features they support so we can know if
they will accept this particular message
controls can now actually receive Idol
they can receive keyboard events and
handle focus they can actually track
themselves your CDF if you're writing a
CDF can actually advertise I want to I
want to do I want to take care of
tracking completely so in tracking child
gets called it will just call your CDF
and say here you'll deal with it we also
have the ability for control to define
their backgrounds this is important with
embedding controls if you had it let's
say you have a tab control and you want
to put things like a radio button on top
of it if that radial button wants to
redraw and it's going to erase itself
and wants to raise to this color of the
tab which may be different than the
color of the background of the window
this mechanism allows that to happen and
it only works with embedding and
basically what it does is it reverses it
goes it asks the control manager
basically says all right I'm going to
right behind this radio button for to go
to each parent of that radio button and
see if it has a special background
instead and this takes care of all the
erasing problems that might have
otherwise happen data access we have a
new abstract mechanism for getting at
data controls the new controls support a
lot of new types and of data because
just because of their nature and we need
a nice abstract way to get at that we
have that now there's also a mechanism
available to get the optimal size of a
control what this means is that you can
ask the button in a perfect world which
size would you be and then we'll come
back and tell you I'd be this many
pixels wide and this many pixels high
and then you can actually do automatic
placement of buttons with that there's
also a nice high level activation
messaging system for controls so that
controls can actually receive a real
activate event instead of retaining like
a last highlight or something crazy like
that control embedding is the single
most important
addition that we put into the toolbox
the old Control Manager had some
problems and what I mean by that is that
if it had one basic assumption and that
was controls never overlapped well in
the world of tabs group boxes placards
and window headers where you actually
want to protection on top of those
controls you need something to actually
handle overlapping previously you had a
situation where you could make the
drawing order correct but then you
wouldn't hit test right or if you wanted
to fix the hit testing then you can draw
right so it was like this weird little
software Heisenberg principle that you
had to deal with so this helps us to
actually maintain a real hierarchy real
high our hierarchy of controls and that
helps us to enforce draw ordering and
hit testing it also allows you to do
really cool things like you can actually
act on controls of the group if you have
a group box and you want to disable the
group box when you just a belief root
box all its children will disable and
likewise when you enable it all its
children will enable do if you move it
they'll all move if you hide it they'll
all hide this this eliminates a lot of
coding on your part in this model
there's a route control which contains
all the controls in the window this
route control is created on demand by
the create route control API and it's
only on demand so if you don't ask for
this API you're going to get the old
control manager behaviors we can also do
smart automatic embedding basically once
you create a control if you were to call
new control or get new control it would
automatically embed that control into
the route pane of the window
normally you may not want to do this you
wanted to embed it inside a tab or
something the ways to get around this is
to api's embed control and auto embed
control alt embed control is used by the
dialogue manager to actually look at the
rectangles of controls and look at
what's already on dialogue and say
alright rich this control will go and it
will find the best place for it keyboard
focus is something new that we've added
you can actually have real keyboard
focus on the Mac now this is completely
controlled by the control manager it's
kind of redundant again you can also
advance reverse it clear it
whatever you want the things that you'd
expect from focus it only works with
controls and only while embedding is on
if you wanted to do this focus in
yourself you could talk to the controls
there's actually a new spend control
message API you can talk to the controls
and manipulate the focus but trust me
it's not very fun
so just by turning on embedding you can
get this behavior for free in future
systems we're going to allow for what's
called generic focus where any item is
focusable so you could tab over to a
button press the spacebar and
effectively click that button right now
the only controls that we have that
actually support focus our edit text
list boxes and the clock control you're
going to see all of these in a little
bit one note about this generic focused
thing is that focus defaults to the
order that you add controls into a
window
so if you add controls radio run radio 1
radio 2 radio 3 that's the order that
they're going to be focused in
automatically future systems we're going
to have the ability for you to specify a
different focusing algorithm getting and
setting control data previously let's
take the pop up menu button for example
the only way to get at the pop-up menu
handle of that button was typically to
just you create a handle to some data
attach it into the control data field of
the control and then you publish the
interface so it's not very clean and not
a good programming practice in general
so what we have is we've invented this
new concept we call it data access of
four controls and it's implemented via
two API eyes getting set control data
these days B is actually used a new
messaging system that we set up some of
the new messages and it's responsible
for actually moving the data back and
forth the API is to set control data and
get control data right very similar to
Apple events and very similar to me to
collection manager each control can
specify it can basically name a series
of tags that you can basically get at
that data which is a let me rephrase
that
these control specifies a certain number
of constants we call them tags for the
each for the pieces of data that you
wish to get at so they might be tagged
for lists but a list handle for a list
box or there might be a tag for the edit
text the TE handle of an edit text field
this basically allows you access to all
the good stuff we have a much better
font control now previously you were
limited to system fonts and window fonts
now you can have any font for any
control there's no restrictions there's
two ways to do this there's set control
font style and for dialogue there's a
new resource called dftb dialogues on
table the dftb is generally paired up
with a diddle and as a diddle is read in
the DF TV is also read in and fonts
information is applied to controls its
most useful when you're having betting
on in dialogues basically because when
you have inventing on dialogues all
items are controls and get into that
more in a bit we have the concept of
these meta font numbers now we have
three constants that you can use we have
system font small system font and small
emphasize system font essentially these
are like just thicker than abstract
numbers to get out of and to test a
specific system defined font family and
size in the future when we introduce
themes each theme could actually have
its own font and small system font and
could be switched by using these
constants you'll automatically be ready
for this and also improves localized
ability some of the things that actually
add to this richer control manager API
are some nice high level API is that
didn't exist before we actually have
activate and deactivate control of an
API instead of setting the control
highlights of 0 or 255 you can use these
new high level API s instead of dealing
with that and also talks to the controls
using the new high level activate
message and it also deals right it deals
correctly with hierarchies of controls
so the preferred method now use
deactivate and activate control whenever
possible
some frameworks and some applications
like to control the drawing of controls
all by themselves
because they know best when when things
should be drawn previously - the only
way to hide and show control with the
use the API is hide control and show
control now we have a new API called set
control visibility this allows you to
actually control whether any drawing
occurs by basically saying you say set
to total visibility to control where
they want it visible or not and then
draw it this alleviates the need to
actually go in and set the control vis
field yourself if you're dealing with
the hierarchy of controls that's
certainly a bad idea this will actually
take care of setting up the controller's
being visible and all its children
automatically drawn control and current
port is a very useful API if you're
drawing off screen previously you'd have
to mess with the control own report of a
window or do some other wacky stuff just
to make this you know maybe print
off-screen and blasted it was pretty
tough to do and it didn't always work
right all you need to do now is just set
your port to where you want the drawing
to occur and call draw control and
current port will take care of the rest
and finally we have live feedback which
when combined with scrollbars equals a
live scrolling finding on the mac OS so
we've been a little busy working out a
lot of things to make your lives easier
because we care and this slide alone
could show you the vast Armada of
controls that we've added and rather
than me bore you anymore I'm going to
bring up the H I lead so the user
experience toolbox is right there and
his name is Arlo rose
so we have been dizzy haven't we we've
implemented 20 new controls that if you
include all the variants you now have
over 150 ways of displaying your
information let's see what we've got
you can't design a new appearance
without fixing up some of your old
controls so we've added the ability to
put the fault rings on your push buttons
our check boxes not only have on and off
States now but we have mixed States that
we supply and as well as our radio
buttons as well to dessert toppings of
relaxes our talking it's both as I said
we support the live scrolling feature
now so make sure you put that in your
apps it's pretty darn cool and I think
every other OS has it now so we also
have done small scroll bars I'll show
you those a little bit later and some of
the other demos we'll take a look at
some of the newer stuff we've had an H I
expect four sliders for a long time but
I don't think we've ever offered what we
haven't ever offered them as a toolbox
item but we didn't just we didn't just
stop with what we've been telling you
guys to do in the past we've added the
ability to do them as directional
sliders we've given you tick marks built
into them and once again live feedback
so that if you have an object that can
take advantage of live feedback you can
use them in the sliders so text we have
text fields now as controls text is
pretty straightforward as you can see we
support tabbing with keyboard focus and
such shift tabbing obviously we've got
an edit text field we now apply a
password field
we have filter abilities in the text
field so if you type in a bunch of care
there's nothing's going to happen until
I type the numbers focusing once again
can show what the password was and of
course tab done to this little guy gate
obviously so who would have ever thought
that progress indicators would have been
something that so many people wanted we
implemented progress indicators
determinate and determinate pretty
straightforward the little asynchronous
arrow guy sitting there not much to them
huh
yeah let's see we've got group boxes
ways of displaying your data in your
dialog boxes we can we now give you the
group box and and separator control
let's see our group boxes can have their
content controlled by either a check box
or a pop up menu
and lets you group all the controls into
a user pane if you're using the
embedding that the Dead was speaking of
earlier and that check box would control
whether these guys are inactive or
active which is kind of nice we also
have icon and picture controls so you
can display icons and pictures in your
dialogues and applications and we have
visible nightmare here bevel buttons
bevel buttons are what I can only call
multifarious
they have so much stuff crammed into em
it's not even funny we offer three
different sizes small medium large they
can act as push buttons as these guys do
they can act as radio buttons like these
little guys down here they can act as
checkboxes if you want to do some stuff
there there's actually a mixed state of
these guys as well which I don't think
any of these show off here they can be
pop-up menus they can have text on them
they can have icons we kind of pictures
they can have see icons the text can be
justified and it can have an offset so
that it can line up with any text you
need to line it up with underneath an
example of that is the finders view as
list here the finder actually uses that
justification to line the name field up
with the icons underneath and we also
support using icons and pictures as as
controlled as well we also have two
other little or three other google
controls spin arrows which have been
another one that we've had a spec for
but never given you as a control
disclosure triangle and an image well
which is what do you know displays an
image so using these controls will
obviously save you development time when
creating a new application and if you're
revving your existing apps take the time
to use these controls so that when you
actually do get theme switching and
appearance your app will look good and
you'll get theme switching for free
right and
freely it's also extremely easy to do so
get on so the dialogue manager is also
much cooler we have a bunch of new
functionality we have the ability to set
theme backgrounds you can have automatic
embedding on request and we can also
handle moveable modal dialogues for you
what a concept so basically you enable
all of this stuff via your bit field you
can set this bit you can pass this bit
field in two ways you can call new from
new what am I to do dialogue new
features dialog that's backwards on the
slide and we have two new resources the
DL GX and a lrx resource these resources
run in parallel to your dialogue and
alert resources respectively
the best combination of features to use
is generally seen background steam
controls and embedding I think that's
where you get the most bang for your
buck removable alert one note is that
when you can actually have a moveable
other alert now just by setting one bit
and the lrx resource one note is that
whenever the system handles moveable
modal's for you
you should always install a filter proc
to get update events for your other
windows that are having another in the
background one particular difference
between this filter proc and any of your
others is that this filter proc will
actually receive all events destined for
your application not just the ones that
were previously filtered or given to you
by the dialog manager previously another
thing that we fix is that whenever you
would adopt the new dialogues directly
we eliminate a three pixel border that
used to exist in the structure region of
the window that always looked like the
content region of the window and this
prevented people from actually running
the content up to the edges of the
window so that's finally gone if you're
going through the compatibility layer
the mapping layer by the way that area
is still there so your metrics are still
untouched
some new API so we've added one of them
is very important and I think you'll get
a lot of mileage out of it standard
alert gens alert is a way to actually
actually programmatically put an alert
up you don't even need to have an alert
resource you basically say I want an
alert here's the text I want to say and
I want you can have up to three buttons
and okay cancel and something which
defaults to like don't save or something
like that you can use has a save dialog
you can also specify that a help button
appear one interesting feature about it
is that it actually will automatically
size itself to fit the text that you
pass into it and it does that by
actually calling the next API auto size
dialog given a dialog pointer auto size
dialog will actually go out look at the
dialog look at its static text and see
what will fit and will actually resize
the dialogue accordingly movement size
dialog item are just for your
convenience only basically what they do
is they actually force the Control
Manager and the dialogue manager to
always be in sync what this means is
let's say you have a button controlling
the dialogue and you move it using move
control well if you go to click on that
you're not going to get anything because
the dialogue manager doesn't know that
you moved it using this API these two
API will ensure that those rectangles
are always in sync
jet dialogue atom is controlled is
exactly what it says for any item in a
dialogue that happens to be a control
will just give you the control handle
this is pretty important when we come to
embedding embedding in dialogues this is
this is the quencher when you enable
embedding and dialogue all items in your
dialogues become controls what this
means is that you have a static text
item it's going to become one of the new
static text controls if you have an edit
text item it's going to become one of
the new edit text controls and likewise
on for pictures icons and whatnot so now
get dialogue and in this control is
actually really useful because getting
dialogue item itself still behaves as it
always did so if you ask it for the
handle for a static text item you're
going to
Hamilton text just like you always have
but perhaps you want to get the control
handle of an edit text item get dialogue
NMS control will give you that control
handle and then you can actually do
something cool like actually disable it
but you can never do in the past and if
you've ever done it you know the pain it
brings said dialog item under this
scheme also has a couple of restrictions
basically you can set the type or a
handle of an item on the fly you can set
user item proc pointers and you can't
change the able and disable state but
you can't go around caging icons into
pictures which is kind of bizarre
anyways and it would also actually lead
to memory leaks with some some in some
situations one other caveat and that is
that set dialog item text won't update
the screen so you'll need to actually
call draw one control on it that's only
for now we'll fix this in the future but
I just want to make you aware of that
the window manager has had some
additions as well collapsing if you use
Aaron you probably have seen the
collapse widget well obviously we have
one two because I'm wearing so this
widget is actually publicly available
what I'm talking what I really mean if
the API is publicly available so that
you can actually programmatically
collapse none collapse a window and you
look you can also test see whether the
window is collapsed so you can do
intelligent things like the finder might
want to double click on an icon for a
folder and the window is shaded it might
want to unsaved the window automatically
you can do that and you might have a
similar application for it we've also
separated out the Deaf procs essentially
you have we have used MW of 0 which did
everything it did SIA you know dialog
alerts and document windows now we have
two wdesk so we've separated them out
why did we do this well basically the
great godiva better we have one for
dialogues one for document windows but
also to free up some variant bits that
we need to put some features that we're
going to get onto in the next slide we
also have two new api's get window
region and get window features get
window region is useful let's say you
want to command click
the title of title bar up a window and
pop up a menu well you don't really know
where the title is well now you can get
it using this new API you can also get
the location of the collapse box the
zoom box that whatever the size box
whatever you want Jen window features is
a new abstract way to find out what type
of a window am I looking at it might be
that you want to check the what type of
window is up front you might want to see
this modal get window features will
actually return a bit field and each bit
corresponds to a feature and we have
features such as it's collapsible its
growable its modal it's an alert which
is a nice nicer way to deal with it than
dealing with variants which is important
because variant codes are now different
I mean cuz we have new def box with new
variant codes and they're all separated
and all of that variant codes are
different so if you were looking for
movable modal D Box proc you might not
find what you know you may not end up
having the result that you wanted if
you're using the new dev box directly if
you are again going through the mapping
layer everything is still the same so
for all new windows or just in general
you just start using get window features
if possible so some of the variants bits
that we freed up allowed us to do some
new zoom variants essentially we have a
new two new visual different look thing
from abhava RINO's which essentially
instead of having the standard zoom box
that you've seen in the past you can
have one with a vertical line the
horizontal line arlo is going to show
you one of these in a little bit
essentially what this does is it gives
user a better indication of what's going
to happen consider Apple guide the Apple
guide window if you were to click the
zoom box to collapse down into usually
the topic as well as the navigation
buttons well that would be a perfect use
for a vertical zoom variant because it
would visually indicate exactly what
which which direction the window was
going to go
typically the old zoom look is done by
the full zoom we call it full zoom now
size boxes are now part of the structure
region this is important it actually
allows you to do a little less work if
you're adopting through the
compatibility through the mapping
lair what we do is we don't we don't
actually draw the grow box until you
call it called drug roll icon but if
you're adapting directly the variant
itself always dictates whether or not a
grow box will appear so what this means
is if you the proc IDs are a lot they're
now so if you ask for a document window
you're going to get a document window if
you ask for a document window with a
grow box you will get a document with a
little girl box we're going to draw it
for you automatically so there's no need
to call it grow like on any longer in
that situation and you don't also have
to do the tricks that you have in the
past like clip out so that you don't get
the delimiting lines for the scrollbar
utility windows also have smaller sized
boxes on the Mac OS Tate
one adopt directly when adopted directly
if you if you go through the mapping
layer again same as always
but if you dot directly they're 11 by 11
pixels and we actually have read the
scroll bars to actually fit in this
space and look you know not all ugly and
stuff so again let's bring up our low
rows who will design for food
thanks dead dialogues and windows
they'll take a quick look at dialogues
in Windows first off let me clear
something up one of the most frequently
asked questions is why did we reverse
the look of dialogues and document
windows when we were designing the new
look there were two goals to achieve the
first was we wanted users or users
rather wanted to be able to drag from
all four sides of the windows and we
wanted visual distinction well modal
dialogues typically present you with a
message they were designed to look
placard like and well of course we just
did the opposite with the doctor windows
so you could drag around we threw a
title bar on top of on top of modal
dialogues if they are movable and what
am I saying so as you can see we achieve
both goals with this design alerts well
we did something special with them we
added a red tinge and if I try and empty
the trash here you will see that there's
now a red red border around that when
they're movable they're a lot more
visually distinct I'll show you that in
a minute as well so now your users will
will know the con
of your alert is an important message so
it's a visual distinction between the
dialog box when you're making your when
you're making sure you're using the new
alerts and not using dialogues because a
lot of a lot of people actually are
using dialogues rather than alerts you
might want to consider using the new
standard alert call we go back into our
little sample app here and bring up
standard alert basically as I've said
before we give you the ability to pass
it an air text message and explanation
message you can have up to three buttons
if you want you can show a help icon and
it can be movable and hit okay and as
you can see it just automatically
generated all of the stuff this opposing
pre-planned at all
and you can also see that if you flow a
whole bunch of text in here let me show
you this one as an example it will
automatically science the alert as more
text is thrown in this is good for both
internationalization and if somebody
changes the text strings on you at the
last minute we also have a new design
for the utility windows that mentioned
before open this little guy up we have
both the normal utility window that
existed here the new small scroll bars
it supports the windows shake widget it
we also have the side slide side side
floating utility window which I don't
know if was that ever public before I'm
not sure if it was and as you saw a
moment ago actually I didn't show you a
moment ago here's the new design for the
document windows it has a collapse box
as well you may remember this collapse
box from the Copeland demos or from
Aaron which was the author of one of the
things we are doing that's a little bit
different from the shareware version
from what we were planning on doing with
Copeland because you can option click
the of course it would help us I had a
bunch of windows open in this layer you
can option click the the collapse box
and will window shade them all which is
kind of nice and one of the other nice
features if I hide the finder and then
go back to it
they stay shaded and that's a feature
that wasn't around before
I don't get why people like that feature
cool so now so now that I've shown you
all this you're probably wondering how
hard is it to make a dialog or some of
my windows appearance savvy let me get
rid of some of these guys here and show
you a quick demonstration of Eudora if
we do a check mail specially you can see
that this this dialog box here it uses
the new appearance controls because
check boxes and push-button stuff like
that obviously they get it that the
background is still white and the folks
over at Qualcomm are using this black
pick as their divider lines well let's
quit out of Eudora drag it into a very
special guys edit open up the dialog
resource or doodle resource now let's go
for the dialog leave its 1:56
and let's first set use theme window use
theme controlled and use theme
background we will make this version of
residue off to be pets and polishing
touches on it with one of our SDK
releases let's open this guy up and
let's change it to a control sure let's
create this guy we change its ID to 144
which just happens to be the divider
line let's set the size of it to be
right in there do the same thing for
this guy
change it to a control open it up create
the control
set it sighs close it up
quit save everything school now when we
go into open up your door again
and we check them in and allow this
connection it is now apparent savvy with
all the right controls it is that easy
so as you can see it's not that hard to
make your app appear in savvy well at
least your dialogues that's about all it
is right when I was actually tasked with
the g-pack of revving date and time to
be a parent savvy basically it only took
me about two days to make the entire
thing appearance aware and one of the
beautiful things about it was that I was
able to eliminate all but one user item
because we actually had the controls
provided by the system now so they had
user vitamins to do things for like the
group boxes then because they had icon
sweeps instead of regular icons well now
we have control to support all this so
it's just basically everything you've
ever dreamed of now the menu manager
lots of good features there we have a
whole slew of new getters and setters to
essentially allow you to set things like
extended modifiers you can now have
command option shift P if you want it's
not a problem we could do it we also
have command IDs command IDs are very
useful for things like frameworks and
open dock where you can actually assign
a position independent command ID to any
menu items so after you receive a
successful menu select you could just
get the command ID and switch off of
that and to reorder your menu items who
cares
all this extended menu information can
actually be supplied in the next mnu
resource which runs parallel to your
menu resources whenever you call get
menu the SMN your resources
automatically read in in place of menu
key we have a new API called menu event
Menu key wasn't very conducive to
modifier keys considering that it didn't
know anything about modifiers so we have
this new event
a new API which basically takes a point
into an event
instead of a key and a modifier field
basically you should probably use this
right after a call to wait next but then
you just pass it in here and find out if
it well if with a keyboard event you
pass it into menu event and find out if
something actually was selected from the
menu it's actually possible to have a
menu equivalent now that doesn't have a
command key necessary for you to hold
down for that so it's not always you
don't have to actually look for the
command key any longer if you want to
actually do that you can just look for
any modifier key if you get a key down
pass it into menu event if you get a
nonzero result back you know a menu item
was just selected
we've also added sticky menus probably
we think it's probably the best
implementation of sticky menus that ever
comes with a Mac and essentially for
people who are used to the old classic
behavior it still behaves right for
people who are maybe used to working on
Windows and Macs
they can out also get the windows type
behavior as well only it's much better
you can't turn it off was the question
but you won't notice it trust me it
perfect the menu manager one little
thing I wanted to talk about was that
when you're creating menus be a new menu
it always uses em Devi's ero because we
have a new EM desk M def 63 is what it's
numbered you need to actually get the
after you create your menu with new with
new menu you need to actually go out and
get the DES process and stuff it into
menu product feel a little messy but I
thought you should be aware of it we
actually have a set of helper utilities
and one of them is called new themed
menu is an API and they're called new
themed menu which actually does this for
you we're going to try to supply all of
you with that little helper utility and
we're actually going to try to get the
latest version of all the appearance
stuff downs in the Mac OS a
compatibility lab so that you guys can
grab the stuff and start playing with it
the contextual menu manager is something
brand-new with Mac OS 8 essentially it
allows you quick access to frequently
used commands so let's say you click on
the trash you're only going to get to
amend you're going to get what you'd
expect on the trash like what empty
trash so it also allows you to hook up
plugins you can write plug-ins for the
contextual menu manager to actually do
other things like maybe compress files
or whatever you can dream up one thing
about sexual menu managers is that
health and plugin things are always
added for you you don't even have to
deal with that how easy is it to adopt
this stuff very easy very few changes
are necessary to adopt contextual menus
first is is simple on toolbox in this
initialization just calling it
contextual menus that's all and your
event loop after an event comes through
call is show contextual menu click if
that returns true you're now kind of
obliged to show a contextual menu
because the user actually is holding
ctrl key down and click they kind of
expect to hit in connectional menu
especially after working there's a
finder for awhile what you should do
then is you should provide some sort of
visual feedback maybe highlight the item
that the user just clicked on just make
sure that it's the current selection and
then calls detection menu select you can
add items to the to the menu that
appears by passing in a menu handle when
contextual menu select returns it will
let you know if something was selected
and then you can act on it you should
really support plugins and contextual
menus it's very easy to do basically you
describe the location that the user
clicked via an Apple event descriptor
and that is enough information to let
plug-ins know yes it's text it's a
picture or whatever another good idea is
to supply coercion handlers so that if
maybe they don't know your specific
object specifier type but they may know
what an FS tech is if you can translate
those types please do it helps plugins
and makes the experience a lot better so
once again
patron saint of the three toolbox our
low roads will give us a demonstration I
should have just put a chair up here
I've been coming up so often so menus
have pretty darn straightforward putting
our Evangelist cord and just said trying
to put the windows and stuff in middle
of the screen so it shows up better well
I can't they're menus there at the top
so menus can now have extended modifiers
and special glyphs let's switch back
into the little sample app here and take
a look at the modifiers menu we have
command shift you can do whatever you
want these are just the examples we also
support icon sweets we can also put
special glitzen in menu now if you take
a look at the finder and move to trash
you can't move a hard drive to trash
I'll be jiggered if we select a folder
into the file menu move to trash has the
command Delete key on it as I'd
mentioned before and somebody commented
on we actually have done a pretty slick
implementation of sticky menus if you
use your Mac like you have in the past
and just click move around select
something quickly move through your
menus you're going to be pretty much
okay if you're just scanning to see
what's going on nothing is going to
stick I know this is kind of tough for
you guys to see because my hand is using
the mouse but if you click quickly and
this is based on the double clicked I'm
set in the general controls panel it'll
just stick and if you kind of sit back
for a while and you have like a server
running or a screen saver that needs to
go off and you're pissed because these
are going to stay open
well they don't after 15 seconds they
should just close up and go away hasn't
been 15 seconds though there we go so
nothing will stop in the background
which is pretty nice
so the finder the finder is one of the
best places to show off some of the
contextual menu stuff they did a really
good job of implementing some neat
things as you can see one of the things
you'll probably want to do is make sure
that your cursor has some sort of
feedback as you can see our little
cursor guy here has a little painting
menu next to it then we've done some
other neat stuff with cursors in the
finder as well so you can do some neat
stuff in the finder like if you
contextual click on the on the desktop
you can change the desktop background
which is kind of nice if you do it as
I'd said on the trash you can empty the
trash from there and the other nice
thing is that even in an inactive window
if you click contextual menus do handle
click through and release the finder
does and you should implement it it
doesn't give team for free so that no
matter what you click on you always get
some sort of contextual menu happening
there so as you've seen in the last
three demos the finder takes advantage
of almost all the new toolbox features
thus making it one of the first
appearance savvy apps around it's pretty
darn cool
[Applause]
an interesting note is that the finder
like Arlo said is the first truly savvy
client of all the new appearance stuff
that we've added and in fact we run
preliminary tests with with a prototype
version of appearance and the finder
actually themes which is correctly and
all the patterns and colors are right
and it's very very cool so let's go
through a little checklist what does it
take to adopt very easy and it's also
scalable you can do this in pieces the
first thing you should do is call
register appearance client just doing
that alone will at least make sure that
you're always running in great scale use
the new death proc numbers directly
whenever possible this will eliminate
the overhead of the mapping layer add
new dlg X and ALR X's resources to your
stuff to make all your dialogues
apparent savvy since we have tons of new
controls try to replace all your user
items with the controls so that usually
gets a consistent look and feel across
applications enable embedding and
dialogue this actually gives you a lot
of behavior for free there's one actual
new H I guideline that we have and that
is when dialogues are going to the
background they're supposed to go flat
and everything dims out with embedding
this is really easy and the dialogue
manager actually does this for you you
can actually do it yourself just by
getting the route control of the window
and just disabling that because we have
this hierarchy it will disable all the
children for you it's really easy
finally or next to finally make your
alerts movable it's not too hard to do
just flip a bit and just attach a filter
proc to handle update events and finally
support contextual menus they're really
cool they're very useful and I think
they'll do a lot of good to to customers
I just want to go over some metric rules
some people may be like well when
critical themes comes out what's going
to happen to my application is I think
is going to get a little Wiggy and truth
is no everything should stay correct
control metrics do not change there are
some rules though and that is that
default rings and focus rings are
outside of maximum 3 pixels
this slide might be a little wrong I
think that fall rings may actually be
four pixels and that's outset from the
control rectangle edit X group box list
box frames are actually out set to
pixels from the control rectangle and
likewise the same thing happens to
progress indicators that said control
metrics are still the same across all
themes but be aware that when themes do
come out window metrics can change and
the size of the menu bar may even vary
so please use a get em bar height it's
the right thing to do in the future
you'll actually be receiving an apple
event whenever themes which occurs and
then you can adjust your windows or
maybe move stuff on-screen whatever you
need to do so that's pretty much it this
is like a really really high level
overview of this stuff there's a lot of
detail in here that I can't really cover
in so much in this amount of time read
the article that I wrote for Mac tech
there's a lot of real great detail
information that you like lots of Star
Trek references I think you'll think
you'll get into it go to the
compatibility lab you know check out Mac
OS Tate see all the new features see how
maybe you can adopt them in your
applications and hopefully I'm going to
try to get this demo the actual code for
this demo down there so that you guys
can actually take it with you and play
with it and see how all this stuff works
and check out section 103 learn about
detection menu manage your plugins
you'll be glad you did
so that's it and I think we're going to
do from the QA now are we yes we are
we have about 10 minutes for QA I'd like
to ask ad to come up here Arlo and also
Arnold Gordo the tech lead for user
experience you've listened to us now
we'll listen to you please go to one of
the microphones in the aisles please
limit yourself to one question at a time
and let's start with this microphone hi
yes it's mastering multimedia
corporation um this need stuff lovely
it's sort of kind of like I'm dreaming
about the years and the one problem I
still got would scrollbars is that the
16-bit control value is just not enough
I've got a list box with a hundred
thousand cities in for instance isn't it
not enough okay so the question if it's
a comment that 15 bits for scroll bar is
not a lot right 16 bit control values
are way too limiting we know this and we
will be fixing it in the future
definitely I promise I swear to God I
came to Apple to making a like the dream
that it could be so ok we are players in
designing experienced age ok we'll next
question okay my name is Curtis when
Isis software I was wondering do you
have a strategy for being backwards
compatible strategy for being backwards
compatible instance if I know of a
system 7 we can provide the experience
extension but if they start with us with
extensions off does that mean our
application will not be able to run or
should we have alternative controls so
this income switch on the bottom so the
question is about compatibility and if
you Reb your extension I'll repeat this
while you work out the microphone issue
all if you read your application to use
appearance now and then you know you
ship it with the appearance extension so
it can work on system seven systems if
someone starts with extensions off does
that mean that your application doesn't
work at all if so there isn't you can do
that do I mean the terms extension is
going to be a chef library you can see
if it's not present you can weak link
against it and if it's not there you can
present a dialog that says you know the
current squad not found there are also
some - tile that you can check to see if
it's present there is the if you people
guessed out that can tell what their
purity is present or not so in the
prologue pure application you can check
that to see if you have the right
environment because the current
extension will be will work back and
previous systems you should be able to
just depend on it and you know if it's
not there just a user that to install it
basically but you may also decide to
have your boat that's what makes your
life more difficult obviously yeah thank
you
okay next question over here at the
center oh don't point oh oh I'm sorry
have ID in the center I thought that you
guys have a gate control I need a time
control and I also want to know what to
do with windows that have a black border
suzanne black title bar like the desk
accessories okay so you need to tighten
you like to date control you're
requesting a time control and windows
with a black border it the clock control
actually does support a time as well
upgrade again it supports both there's
even a live variant so that you can
have it ticking in the background and if
you have it editable in life you can
actually change the system clock you can
do a date and time does if you really
wanted to okay great as far as the black
title bar things what what is it that
you really both we have one window in
our application which has the black
title bar and what happens is that
window will have all the old appearances
while all the other windows and
application get the nice new appearance
right so it would be nice if that window
with the black title bar also have some
modern looking look and feel to it can i
what do you use this window for whatever
content that you have in it well it's
actually it doesn't look like a desk
accessory window because we change the
the rounding so it looks more like a
document window but it has it's supposed
to indicate that this window is the main
focus point of the application and all
other windows are children of that main
window and yeah I think what we might
want to do in this case is have a custom
WF in general we're going to depreciate
this project n of a window I mean it's
still going to be there you can still
use it but it will look the way it does
now if you want to have something
different you can quite Rhonda be dead
for that okay get me and we are just
quick know we never actually redesigned
that that particular WD uh the what we
were thinking about doing though was was
just making it automatically default to
the document window WD we thought that
probably piss a lot of people off so we
just left it alone but if anybody wants
us to do the document windows which we
don't mind doing it we'd love to get rid
of that w that okay now over here is
documentation and our sample code
currently available on any of the
monthly mailing CDs it's not available
yet the CJ is not final so we're not
putting in there yet it is available
with the tempo speed so if you download
tempo you'll get the documentation the
sample code and everything the good
there is also a debug version of the
trance manager which might be helpful so
you can get hold it with the tempo speed
and as soon as the SDK is ready design
you know to write
documentation all that it will be under
the microwave 50k as well is it
downloadable without getting all of
tempo which is gigantic
can I get download just on one piece not
at this point but we'll look into that
we'll see if we can do that or you can
also get it at the hands-on lab
downstairs okay this mic over here okay
I really like the new static inedible
dialogue text especially the resizing
but am I still going to be tyrannically
shackled with 255 character Pascal
Springs
unfortunately yes thanks could you
excuse me
you could you could put two text rings
in there I'd love to see this dialog
with more than 255 characters yeah sorry
okay we are here Chris F math works
actually this is in reference to the
documentation and the header files and
libraries that are up on the dev world
site there mark is not having been reps
it's a three and I was just wondering if
there's we have brand new ones we have
brand new headers and libraries
downstairs and compatibility lab okay
because I've had some link yeah we know
they were out of sting for a little bit
okay thank you thanks currently if you
select a menu and hold the mouse down to
sort of browse the menu list the windows
in the background stop updating there's
the new sticky menu option breakfast out
of fifth time currently it still stops
ball processing like like it did before
that's one of the reasons that we have
this is a 15 second timeout set anything
in the background maybe download will
actually get some time after that we
don't have a synchronous menu behavior
currently
we're here since there's talk of 255
character filenames heading our way
Jenny plans to reduce the font size for
really large window titles in your WTF
really Moffat one of the things that we
actually want to move towards in the W
DEP and we haven't yet but we will in a
future system release is actually
centered truncation so instead of
reducing the size what we'll do is we'll
probably do some sort of algorithm while
we'll convince the font you know do as
much as we can and then just send it
truncate it so you can see both the
beginning and end of whatever the string
is that's what the finder does currently
in ListView and we'd like to be in sync
with them the other thing is there's a
lot of my users know I like Windows with
lots of grow boxes in them and I really
urge you to make a grow box into the
control that will follow whatever the
current theme is even though a size box
is generally associated window it's
quite useful to associate it with
anything else within the window they can
grow like a list box or multiple list
box or multiple views or whatever
yeah great minds think alike we we will
be providing that in the future and
finally there are parents manager
templates for resource were available on
our website and they'll work in the
current version of resource work if I
was to ship the appearance manager to
run under system76 will it affect the
appearance of all the other apps in the
finder I found with an earlier version
of an alpha that I actually got that
behavior that's actually a really good
question we actually have it's actually
possible to specify that when you
install you can actually customize the
appearance extension so that only your
application is affected if you want and
it can default that so that only your
application will be in grayscale you
won't disturb the user in there and
everything like grayscale so we do we do
have that ability thank you okay I think
we're out of time so thank you very much
for coming we have another session about
user experience just after this one so
their own thanks
[Applause]
[Music]
you