so first of all i'm supposed to say that i'm very disappointed that you started

glottic without me

i wish i had a lot more of screen shots and slides and stuff but

well i have a enough material for the time and i wanted to make a

longer history but

the history would have taken up all the time anyway

so

the point of this slide is

the point is to discuss a little bit what was the history of G T

K A

user interface programming paradigms over the last ten years or so

before live blade or around when we had the blade then we had to well

everybody was writing code by hand right

but the plate was pretty early in the G T K history you had played

first and the

so a lot of people were writing code

mixed in with the generated code that they

build with collate so glade had only one feature

to export which was to generate code in different languages and you would have

you would have a whole application defined in an X M L file

and one callbacks nazis just generated and people would just enter their cold

it would be completely on maintainable

so that's interesting fun fact is that the blade was created after delayed and it

kind of just was a hijacking of directly project file format which was a really

neat trick by change ten strange

and since then we had since then we have the blade and

back then

it seemed that

installing your user interface

separately from your programming and allowing you to view your changes without compiling was all

the rage i don't think we really care about that these days but that seems

to have been all the rage back then

right so back then how did we used to write code we could write modular

code but it was not obvious

i have a couple of code examples that i wanted to show

and one of them was

sh this is

okay the this emacs is really huge on the screen but

i seen a lot of code like this ten years ago basically you just create

a structure and you build a lot of widgets and you have any pi its

object based see it's not object oriented

but you know people managed to and

well maybe it's coming back now with templates you know this modular kind of way

to write code but with late we just had a big mess

huge user interface and many callbacks

so just scroll through the well basically

what's that

so where

okay so

a eventually and my miss and my stepping over something after the blade

after the blade well after the blade there was to take a builder but that

came like five years later and

and there is one interesting events that took place or event i started noticing the

depth help program had bills itself as the G object for the preferences dialogue and

use the G T K builder

in the initialization function to create it's own interface and

and it looks like a whole lot of boilerplate an extra lines of code like

to do something pretty but it was it was actually really nicely done

which is

which is great you know and i started to encourage people to follow that paradigm

but

but people don't right

people write the code that's obvious to them and if we don't guidelines

and techniques and even

infrastructure that forces you to code in a certain way then people are just going

to write very random

random things like for example

how many times have you heard the question

how do i get to pointers

in my callback for G signal connect

you know what i mean like that's like you're tackling the problem the problem from

backwards you're not thinking of the design you just

want this function to work right now what are you gonna do

and

how many people have seen cold like this

like you have your callback structure you know

and you allocate your callback structure

you connected you have your data

you know if you're lucky somebody thought of releasing the memory at some point

and no but what it does to is that your dad is all over the

place it's not centralised it's not it's not pretty it's not organised and

and you're working in the environment that is

errorprone because of the implicit invocation possibilities are enormous

so you're working a project that's has all your dialogues all your buttons the same

name space

and anybody can just connect a signal

and that can cause another signal to fire and there's no really defined limit since

all of these objects are visible so you can have recursion and it's very hard

to track these

implicit invocation loops

yes i'm not really jumping in order here but the whole generation

i don't really have much to say about that but it's what everybody asks me

why doesn't lead generate code

yes

yes maybe less in the last couple years but yes constantly

ever since we released late three

people cry about that

yes like now i have to call

glade X M L load from file do you take a builder add from file

and

well i mean that's the thing you know like it's

your and you never gone and you never gonna use like twice if you're gonna

use generated code just never gonna work out

okay so

after all that hey we have templates

and not everybody knows what templates are but the templates are a way to encode

G T katie builder X M L file descriptions into the widget class so that

when you create an instance of a certain type

it's complex it's components are automatically build and the variables referring to it are resolved

and callbacks are connected

it's just the formalism for creating and composite object class which we involves no grunt

work

there is a P eyes to call to describe it but there's no crunch work

so not only do we gain

by removing steps in the process of

developing code but now we have a standard that's

people can adapt to they can say this is the way that you write a

composite widget in G T K and they they're not going to do this

they're not going to ask how do i get to pointers in my user data

they're not going to run around in circles and they're going to have a half

in front of them

alright

a mean one

so

in this last ten years i guess ten years ago there was already this next

that environment which was already doing this

and little parenthesis here i

i used interface builder and i used flash five years ago and that's when i

started going crazy about templates and

and it just like using X code in interface builder just

just made me realise like

how straightforward that is with G T K builder and

kind of feeling pathetic about how come we did not do it yet and

and it took this long here we are

so next step environment is the apples objective C programming environment and name files is

basically the equivalent of interface builders G T K builder format

and they've been doing that for ever

and they have some cool features to optimize your work flow so you can

what are the features that they give you

right you have those weird clients that's true you have the X code here and

you have interface builder here and i wanted to put screenshots but i'm sorry i

didn't have screen shots

it's quite an acid trip because you have this like

list of events that an object can generate like two signals and you have

that's like in your plate right and then you have your source code editor which

is that code which is kind of like sensitive drop target right and you grab

your

grab your signal and it's in another window

and you drag it to the method and then that means that method is going

to rip sponsor that signal on that object which is component child if you're right

that's a big blue line just strands across the screen

anyway

it's but it's really practical i mean it looks really strange but it's really practical

there is actually so many things that we need to do in late to support

this properly

"'cause" right now we only support just creating a

object class right which is komplet defining one composite object class but

another example of a cool feature to do is in adobe flash create or you

can take

you can just go ahead in your work flow will be i'm gonna design interface

and there

i mean it design interface

right

and

i have my i don't know my album jacket you know and

my song titles and you know my

more but

i don't know okay

in search

money no

whatever's going on there

and so i have a mock up and then i can just like take this

box

alright and i can right click on it

and say export that as a class

no just give me give me a list browser because i'm gonna use that in

like three or four more of my interfaces

so this one is like maybe a

i don't know song browser screen you know and

this one becomes a class called soundless

you know

that's from a i don't know but catalyst i use that with action script three

there's air there's the

but it's a i think that paradigm is going to work just as well as

on air as on your streaming swr

but it's really practical because then you have this new objects and you can either

export it as a class which means that you're going to implement it

or you can just since it's flash right you have these compose it thing is

and they're just drawings and pictorial object right so you don't really need to have

cool

we can just use them and paste them

and what's really interesting is that you have a project that's composed of like maybe

ten classes

and when you modify one then you see the change in the other and everything

is reactive

this is where i want to go with collate

so how far did i go

yes

before we continue

i did pull this out

this is how it's done

this is how it's done in

coke or and the next step in interface builder

basically

you have this guy right i be outlets is a syntactic sugar that's custom for

the next that objective C implementation

and declaring your you while able as an I B outlet means that my text

is associated with an object that's in the next that interface builder file so

syntactic sugar that basically means that label is part of might need file

and that same thing goes for

i be action

button pressed

right

so

as you can imagine you only get to see that ellison teacher blue line across

the screen if you have an I B action on that method that can handle

that signal

right

right so that's i don't have flash script i wanted to have action script because

it's more cute then we then the objective C but

i couldn't put it together so

and that's all because you guys started one day early

alright

this is this is what was on the internet on my blog site

when we got it when we for men got it working with dollar

his name is luke a

that's right

so here you can see the same pattern is repeated

except we have this extra syntactic sugar which means you're probably class is going to

be a template

i'd this isn't exactly a tutorial about how to use power actually

i am a big advocate of all the but i've never used it myself which

is a bit strange but

maybe i was told that means i'm a true believer

huh i

right so

well the distinction is in objective C you have to use this controller object class

which i thought was kind of silly and i didn't what i did not want

to repeat that in G T K but they have this object can just you

why view controller object which is

it's a kind of metal objects around your screen

and

only using that object can you create compensate the interfaces

so here we have the equivalent you have dedicate templates do you take a child

is pretty much synonymous with the I B outlet

to let you to

course in C code this is a little bit more verbose but

but i think that we've got something really much nicer much more bleeding edge cutting

edge and i wish that i had the

screenshots to show it off better

to make us a little bit more ashamed about how behind we are

right

and so do you take a child and you take a callback right

now this is pretty simple you can create a class

create a you wife i'll put it all together this is just going to work

in this demo you have an entry

and you have of virtual text property

actually yes its kind of virtual because there's no storage you'd only sets the text

on its delegate entry object

and then when the entry changes

he notifies that virtual property has changed and that's a callback which is of course

connected to the entry inside the late file

in response to it's changed signal

who

it's

what is it needed for

it is

it declares your method or your function as a an endpoint for a signal that

can it

it becomes accessible to the name space that glade refers to for signals because we

couldn't really except D L open G L send

you know

so you know this kind of nice or you know like so the class itself

create a dictionary of

functions which can be called and the

the interface file the interface description only has access to those symbols

judy cable there will fall back to D else in but you don't have to

remember that

okay

i'm sure more parenthesis

right so we went over this in the beginning basically

adding this doesn't make anything new possible i've seen this

approach

there was a there was a python library are a something i remember but the

they had their own

kind of implementation of this but it was like a base class how to teach

a builder instance

who would you know like they it would respond to calls of like get this

or get that by looking at its own builder file then

but you know people have been doing similar things but

having an infrastructure for actually doing it

makes it so that people actually do it and that it's easy for them

that makes all the difference

right and we don't find these situations where

some code is reacting to you know like

you press the button

in your callback that change the entry and the other guys

hearing the entry changing he's setting the end of the scroll bar to be not

sensitive and

and it can go in every which direction but

since you have that built into a late file built into an object class then

there is no room for

unexpected instances of it

implicit invocation

so

i kind of think it's a good idea to move towards explicit invocation everywhere you

can "'cause" you just can't really define how program runs if you're relying solely on

a reactive system

everything is just reactive to each other

and reducing steps right so this is this is where we want to go with

played we need to redo steps

and by doing that's well i it implies that somebody here is gotta give us

a few hundred thousand dollars to invest in making late but

if we do it

right it implies a lot of work you know because as soon as we start

looking at these kind of features that they're doing in adobe flash or in

in interface builder

we're looking at us

making a single project full of a lot of different late files

all these play files a part of the same project now and one thing changes

so you have you have to unify the undo redo stack you have to do

all kinds of

all kinds of facts lips tricky stuff

has to be done especially if you want to get that feature which i want

you know

the experience of just throw up a markup and then break it up and create

an implementation from that markup

which is great well you need a lot of work to get that done

and

basically that's what we're looking for good ideas to reduce the steps

reduce this that's in the process of creating a good user interface without

you know without making it right

while keeping it

keeping it great keeping it clean

and making it easy

that's what we want to do so any suggestions

yes that's true

so something that approach on we can talk about right now is help you read

well not to sit don't three take it recommends like using specific spacing specific padding

and all that sort of stuff and right now i'm about simply when you insert

a child widget it's like it's all went up the next to each other of

a quick thing or so easy thing that i would say but i don't know

the plate will base is recommending a good set of default so you get a

good home three compliant apple right out of the right of the box

so i mean it sort of our cargo but i think that we need to

think about how we wanna strictly interpret making no maps going for

and i know what a problems and everything magical you don't space back how you

it's from the window we are do you

we've

we circled around that for a while we have this

custom code forty to get dialogue and there's a kind of trick like there's a

one little nasty trick about indicate dialogue is that the child of the content area

must have five pixels border

but not the content area itself because that would cause the action area to also

gained a border

so it's kind of really young you know and some of those some of the

things that G T K's doing with padding

which is sensible is

assigning it from star properties

like a few of the G T K dialogue good space things and patterns are

like you can set them but it means nothing it will it will be overwritten

by style thing settings when adjudicate dialogue initialises

a big question we have to ask ourselves about that is do we want to

relinquish all of that for C S

control it

but it's definitely something to look at

i also one more question what well i actually just be able to fly widgets

around to reorder problem and

hypothetically right now no

boy

it's not working

it somewhere

well actually thank you so much that's i

what about putting for non widgets what about with what's for non widgets

for non widgets like your application

and we move be there to do you

right you says also is the main thing to do you live

now we it's i guess it's true we cannot really you know expand let's go

until we bring it lower but i understand that you take a builder might not

be the thing

it might not be the implementation it might be

might be something barry and based or i don't know what i don't know i

don't know

and we probably need we need serialisation as well is D C realizations right if

we're gonna move something like that instance you bright no i'm not talking about you

need to do that but i mean it's fine if it's okay but if the

and i can also use it to construct things that are not which it's like

say for example there's this semi common paradigm where you have mostly static menu structure

but then you have like you know one menu that you wanna be dynamic or

one section so you have some menu layout and then you have a and i

on one subsection that's like recent talk

something like that or your bookmarks

and then you would want that become an instance variable in your application so that

it's easy to access

so it is it's really liked the same internal try but it's not being done

with widgets

well okay of course you have that at G T K application we know little

but to take application

it would have to be a rewrite i mean it would have to be a

ports because we have this abstract class it does a lot of stuff

right

maybe we can do it with those like default implementations of interfaces

but even then i think it would be a big can of worms

i exactly yes

no

no that's no well it's

no it can but there is a few quirks i mean do you take a

widget as the destroy signal and we use that to memorandum memory manage those instance

variables right

probably

it's probably you

it well it could be documented that the instance variables

exist until the first dispose cycle

it might not be so find in practice

but

i don't know it technically the technically the implementation should work fine with objects

it really should there's nothing really widget specific except that you know we have to

take a container

it helps you know

but it does it you know like i mean actions go in action groups in

you know text tags go and text tag tables and

okay was it was it not long enough do you need me to make a

performance

that's twelve and that makes forty minutes or some

that's

they

it's it has to do with your arriving early it was a preemptive attack must've

been coordinated yes

i think i read recently that a lot of the you wanting ladies

generated essentially

is to generated

yes we well generated it's with templates

right

i mean wanting out become quite interested in doing is

like designing it yes definitely and the summary things that are in the you want

don't need to be

i i've been i've been starting to prefer those like

that symbolic icons

we can also much no

that's little

plus and a minus it's very personal thing fruit

and basically they we have like thirty you why files

in the plug ins directory that like you can load and

it doesn't look exactly the same as in the end result but that's you know

you can edit those editors in played and i did it very fast

and knowing that you can change

right

okay well we do generate the property editors based on what is in the widget

class

well someone

some of the interesting things are like stuff that i

stuff they can be hidden

you know that it's not really useful as a property in your face but like

but a different way to set it you know like right now i have in

the common tab i have a tool tip property

and i have a check mark whether it's whether it's with markup

the way i don't have like a tool tip property and it like a tool

tip text property and a tool tip markup property you know like

well how long ago did you see the editors

less than a month

more than a month

let's see what it

little at least

let's see what i got here let's hope it doesn't crash right startup but

okay so what do we got

it's this is very small screen it's pretty bigger

right so

i

this is what this is

i

i have some like this is that application chooser dialogue and then isn't there

there is the where is it

and this is an application chooser widget

that's not a good example

let me just find one that's the is

the font but don't know where is that

in the middle

okay

i of course

right so up here we have point user attributes

and

and the where is the one chooser widget again

it's just the

that's the combo box accent font button there

and then this one so i have this box here font button attributes

and so like i have this one and everything that's a fonts

you know one selector

i just use that again

and i repeat it

and that that's works for like that choose are the recent choose are the there

all shared components of components

no actually right now after doing all that i did not remove anything everything is

still there

no i would not be opposed to that at all like we had that conversation

before like maybe there's an advanced mode

maybe there's a different view or something more

you know like i've been resisting the tree view idea for properties because i wanted

to get there

for so long but now that i'm there wouldn't be a bad thing to have

that review it as well because

search for properties yes

i

this isn't this is the widget editor know in the comments that

yep your visible

flags and

this is the tool tip it has a custom button that means that you know

you're going to it's gonna has tool tip true

so then you get the query tool tip signal right

yes it can be empty like

and it's gonna be you know it's a it's gonna be even better when alan

runs his fingers through the grooves between the widgets and adjust the spaces

i hope that

a accelerators

yes it is

it is

it's possible maybe

actually those are the actual property others which are mostly custom widgets

and it's possible that it's like

in the U I description but it's possible that it's in that custom widget

which is faulty not expand

alright

so does that do it anybody want to come do would dance

okay

okay we have things to discuss

we can we can have a mud wrestling competition and you know like we can

do get out and

maybe will like for G action to be you know G T K action because

it's like all of the same features only we don't change the A P I

we

right that called

well

once okay

it was a right