0:00:14hope you can all you me it's not that you know and peace to free
0:00:18to interrupted anytimes and questions
0:00:21so the topic is G T K propagation developers and
0:00:26i've
0:00:27but not us but it's an abstract that wasn't really clear on what i was
0:00:30going to do so well actually sit down to write prepared this talk i figured
0:00:34and i want to try and just show some examples of what's possible this project
0:00:38a K and i hope i can convey these examples that it's actually it's really
0:00:42easy not to build country style applications as we expect them to be that they
0:00:47had about that's
0:00:48nicely nice transitions and all that stuff that you see in blocks and rather than
0:00:52and these applications
0:00:53this is dedicated point and
0:00:56but most of the building block so that are in place and
0:01:00it doesn't take that much work to get something like that off the ground
0:01:04and i will show that in the series of examples
0:01:08then i had his nine steps
0:01:10yesterday's on going to show nine example sell forget so the
0:01:14and at the end i will have something that looks a bit like an application
0:01:17just really limited but that's something
0:01:20hopefully inspiring and i did not prepare a slide so this instead i decided i
0:01:26want this material to be available for the longer term so i will call as
0:01:31actually wanna but examples they all available in the did okay so three itself sometime
0:01:36last week
0:01:38and that extra rolled around it is it's all available in the G D K
0:01:42A P I documentation you have a tutorial section there and you check that right
0:01:46so you can look on it up online if you want
0:01:50it's available that solve
0:01:53last week
0:01:54and we'll see how well it actually works for talk it's an experiment so let
0:01:58me know if it doesn't work more than five to do something else
0:02:01so but before we step into the examples maybe it's were stepping back a little
0:02:05bit and ask what actually is an application we learned from that out yesterday
0:02:11how we things an application to look at the star trek future it's all the
0:02:14single bundle that you can just download and run it without installation it will be
0:02:18very cool but that's not quite where we are today so as of today applications
0:02:23that have a number of things that need to be spread around to five system
0:02:27and i just put up the list the of the things that are they obviously
0:02:31it's the application binary itself expected will use a bit
0:02:36then applications need to have a testify that's pretty from the established that the show
0:02:40can actually displayed nicely and it also needs and i can for that obviously
0:02:45and then every nontrivial applications will have some settings and for that we need a
0:02:50setting schema and then they might be just a miscellaneous other resources like you i
0:02:55files and whatnot
0:02:57which you would ordinarily also spatter on the five system
0:03:01but we actually have resources nowadays if you pay attention to the examples to see
0:03:05that we actually get to put all those other resources inside the binary itself so
0:03:10that's all already a pretty good step towards the
0:03:13single file application future
0:03:16that we want to get to
0:03:18and don't here i'll talk a little bit about all the stuff that i'm hoping
0:03:23to touch on the examples
0:03:25i'm not gonna we the whole list here you can see this stuff to go
0:03:29to so let's get to it
0:03:32in stockholm building up a vacation
0:03:35so the first thing to know about they don't want to use jic application here
0:03:40which is the application class that you can provide so that yes
0:03:44yes i know i just wanted to have the idea one line main functions like
0:03:50i was willing to like except that league
0:03:58so let's not go to too much on that the one thing to take away
0:04:00he is that the main function is really not ready action is it's just the
0:04:04one line that the really just creates an instance of obligation class and then we
0:04:09college application on it and to give at the command of parameters minutes it
0:04:13not much else to that's all the all the logic of application and all the
0:04:17ending of command line options and all that is happening in the application class
0:04:22so one and a little bit us a very trivial application classes we do some
0:04:28plastic application for that that's the intended way of using it
0:04:32and we used to the usual G object want to pay for that we don't
0:04:37really implement anything here yet
0:04:40just december entry points to applications this for instance if you just run the application
0:04:45all about them not giving it any arguments then we have an entry point it's
0:04:50called active at a
0:04:53which is what is called when you in then you just run it by itself
0:04:57and i have a kind of trivial application at implementation of that here which just
0:05:02creates a new window and then presented
0:05:05the entry point that i have implemented years opening files
0:05:10so if you run the application and give it file filenames on the command line
0:05:14well colour different into point it's called open and that gets an array of files
0:05:20and in this implementation here not much is happening we just
0:05:23again we created i would know and then we call this
0:05:27open function for each of the files and
0:05:30magic might happen the functional not
0:05:33and that's about it one thing to maybe briefly possible look at is
0:05:38that creating an application
0:05:41subclass you always want to have an application id that's kind important because that's really
0:05:46very central concept in the board of the application you really want to have an
0:05:49application id which is used as the last name and it seems just of ideally
0:05:53you system in for the best of file and all those things so we need
0:05:56a unique identifier for the implication
0:05:59and that's this idea here
0:06:03that's not a of this fairly trivial skeleton implementation is that just saw for that
0:06:09at some places i created windows
0:06:13and those and those are actually instances of this class example up a little
0:06:19which is a subclass of G T K application bundle and
0:06:23again this is an entirely empty imitation does nothing but than necessary scalable is a
0:06:28so it's a question like the last slide would be one line and it's this
0:06:32main what do you can tax you bind text domain is that handled for you
0:06:37and you have to shine directly or should and i mean as well i only
0:06:40glanced over that here but i guess you would have to do some setup work
0:06:43for that and okay so you do that automatically there's no magic that's just a
0:06:47matter don't know okay
0:06:50maybe my dad that if you to i don't know that
0:06:54so maybe things are changing that offer knowledgeable if you wanted internationalisation you have to
0:06:58set that up
0:07:00okay
0:07:02last thing that i have in this initial example is that we also one and
0:07:07i can attest of file up is the created some
0:07:11model like i can dare think the game for five minutes
0:07:15and
0:07:17the decibel it after five years also very couple of i just put an ad
0:07:21in the idea
0:07:23just to cheat a little bit because i'm running one able runs that location in
0:07:27a minute and i'm actually running it uninstalled so i have to actually catch to
0:07:31like being here
0:07:33to make that work
0:07:36and we actually switch to
0:07:39running his example
0:07:44should also take first
0:07:47this is inside the G T K so it is an examples directory and if
0:07:51you look and that
0:07:52this nine subdirectories which contain examples and i'm going to here
0:07:57and right now i'm stepping into the first one
0:08:02and it's already component are running it
0:08:06who this my educational it's not very exciting admittedly
0:08:10doesn't really contain anything it doesn't even will the title
0:08:13but
0:08:15notice that the channel already picks up the it has some five
0:08:19and find see i can we just because i she did a little bit and
0:08:22put the i can in the whole local share i can somewhere and up to
0:08:26justify there's also just that this works you
0:08:30and realised of course it's all these files and user share somewhere
0:08:35have it worked that way
0:08:37so it's not very impressive but admittedly we didn't write much good either and
0:08:43well there's not much to see this already
0:08:46it's a football geolocation which has a presence on the bus a single instance
0:08:51characteristics
0:08:53and it technically also kind of file so right now i just activated that are
0:08:57running it without arguments but it could give it a
0:09:01an argument like this
0:09:04well nothing else happens because we'd have implemented the open function yet but at least
0:09:07it accepts the adamant
0:09:10and things are set up for the next
0:09:15so step to is
0:09:17this winter was twenty so yes
0:09:22it's annoying isn't
0:09:24so they're not here
0:09:27and then for that
0:09:28okay so i'm next that is still
0:09:32get some content and the window so that we are using something that if you
0:09:36went to just on stock just before lunch you probably talked about ten that's
0:09:41maybe you didn't did you
0:09:43okay so we're using complex this is all just on that in the last year
0:09:47or two and it finally landed in G T K
0:09:50so what's attempted is likely you i follicles want to use to editing that's great
0:09:55operating late
0:09:57and
0:09:59just like that you can see the beginning of the file
0:10:02the my main difference between that and the directional you i find is that attempted
0:10:05actually define say it complex which is like a container with internal structure
0:10:10and you can use clay for populating that instead of having to manually writing in
0:10:13that function that that's G T K contain i had of this G T K
0:10:17box next out of that and handily really write a lot of code for populating
0:10:22your constructed your complex you are you can one adding like know which is really
0:10:27pretty nice
0:10:28and so he is our initial and that
0:10:32you can see we have a defining the example happen a class that i showed
0:10:36earlier
0:10:38maybe just pack a few things in the first of all we set some useful
0:10:41properties like to be no title and the people size
0:10:45maybe put in the box and they have the populate the box that i had
0:10:48about a stack
0:10:50you can stick and didn't and inside the had about we have a stack switching
0:10:55and i see these which it and actually in a minute
0:10:59but first able to stop briefly and show how we actually get to use this
0:11:03template so now we just click on the set
0:11:05you i file
0:11:07and
0:11:09to make use of it for actually defining application middle class we because a function
0:11:13called G T K widget class set template from resource
0:11:18which finds this templates
0:11:20to our
0:11:21or subclass
0:11:23and i talk about the results that in a minute bottom that's the first step
0:11:27the other step is that then we actually instantiate this class integrated application the know
0:11:32in the in a function for that we have to called you can project in
0:11:36the template actually use the template and populate our instance
0:11:43it's a two steps for using attempted
0:11:45and i touched on that earlier be using resources
0:11:50and
0:11:51that means that we actually take this window dot U I for the to the
0:11:56national italian fee turn it into a
0:12:00resource hundred happy then link into our education binary
0:12:04that's done using the tool called
0:12:07gina compile resources and do the proper resources takes
0:12:11it's input like we tell it what actually to compile into that resource bundle by
0:12:16but in this little excellence that up there
0:12:19and i'm not gonna get too much into it if you want to really look
0:12:22into that you can check out examples
0:12:25in the repository that's all hooked up with the makefile you can see actually running
0:12:30looking let me switch back to actually running this example now
0:12:35so we are stop to
0:12:38and i'm running it again
0:12:41but
0:12:42as you can see the windows not entirely empty at this point you have
0:12:46obviously we have the window title and if you if you look at the top
0:12:49of them and you can kind of see the and you had about their which
0:12:54it's not really prominent of the that's gonna get populated in the next steps
0:12:58well no this is just basis for the work
0:13:07okay so that's me is
0:13:09we want to actually populate the speculated that we put in place an ultimate upon
0:13:15that out and we want to
0:13:18i to act what you know if you can are already passed financial the command
0:13:21line so the next have a step we actually want to open these files and
0:13:25children
0:13:26for that
0:13:30because if you know features that want to mention
0:13:34all example brno class now case a private start
0:13:40you can see to find out there that contains just one on i'm not currently
0:13:44this stack pointer there
0:13:47and there's a new way actually just change recently you the way it used to
0:13:51be for private starts that you use to call
0:13:54G type class at try that in your class in a function and we turned
0:14:00that around to cycle and we actually made that more declarative so now the new
0:14:04way of doing this is that you use G define typhus private and that that's
0:14:08automatically on seems
0:14:10we don't have to do anything anymore in your class function for this
0:14:14and it is that you can do something else in your class in a function
0:14:16which is
0:14:18well you can use
0:14:20this somewhat magic thing here called G T K widget last
0:14:24find template right private that's quite a most well i think that's the content of
0:14:27a long as function name and G T K
0:14:32i couldn't really how it need to be that long to fit all the naming
0:14:35patterns and everything else so what does this do
0:14:39just for the should things behind the scene so we give it the example happened
0:14:43or name
0:14:45and we give it a name of variables that there and
0:14:48what's happening behind the scene is that this instructs you to create a
0:14:54because to use the private various function it knows that it actually is supposed to
0:14:58look in the private struck that's also associated press example happen all so example up
0:15:02in the private
0:15:04and
0:15:05should look for this stack member in it
0:15:08and it showed populate definitely
0:15:11that which it from the template that escorts that
0:15:14so this is one of the magic not at actual this that when we get
0:15:17to a instance and it function we can rely on the fact that the
0:15:21the staff member in our private structures is pointing to the better that we want
0:15:25to point to
0:15:26so there's not a lot of hassle manually look and also
0:15:33i don't know that's a question from under
0:15:38okay so this was just preparatory work for actually
0:15:44doing some actual logic here i'm not gonna explain this in detail
0:15:48this is the code to create a store dwindle great attacks to inside it and
0:15:53open the file that was passed as an argument
0:15:56and populate the text to with the contents of that file
0:15:59one thing that's worth pointing out us some venom at all this a line the
0:16:03record it a stack at titled
0:16:06that is very actually at the
0:16:08this more brno S A H in our state so to speak
0:16:12and
0:16:14we give it very unique identifier for that we just use the basin of the
0:16:17file and then there's another argument which is
0:16:21did a display title to actually show in the you know i will see that
0:16:25the be obvious one so run it
0:16:29and the other one thing i want to say about that is that the display
0:16:34type is obviously going to be displayed but this text which i would just the
0:16:37rolls of caps
0:16:39but we don't have to touch this text which at all you because
0:16:42this text which are just getting all this data needs to know how many types
0:16:46display able to show and then by looking at the at the stack that is
0:16:50associated with
0:16:58so the problem
0:17:01so i'm switching back to running as well
0:17:06well that's magic now we actually have contended it looks like a real application of
0:17:09so let me make is a little bit and actually given files
0:17:27i don't know that's a question for the design as i think i mean i
0:17:30think about available for this case
0:17:32and
0:17:34i would i'm sure the designers would do time we often find something wrong about
0:17:39it works so
0:17:42good things to say it is that you see this text which are now that's
0:17:46the like the two buttons updated
0:17:48those get created but it's text which are
0:17:51and you know the
0:17:53the content of the file at U C obviously council
0:17:57from the function i just showed you and we can
0:18:00actually switch between them and it works so that that's you can stack and you
0:18:03can stick switcher
0:18:05connection
0:18:13i just keep moving on is this questions feel free to interrupt me at any
0:18:17time
0:18:19next this we want to resolve a little more that an application menu i don't
0:18:22need to say too much evolved modification men us and how it works
0:18:26well dive right into how you do this
0:18:30and also get specified by educator that you iphone
0:18:34like this one here
0:18:37and i don't think i should say too much and details about the syntax you
0:18:41can see that we actually created menu element which is a menu not surprisingly and
0:18:46they can be sections in there
0:18:48and items and the items have
0:18:51a couple of at a good see a we set a label which is what's
0:18:54gonna going to shop in the U I
0:18:57and then we have an action for each item
0:19:00which is what's going to get activated and you have to check on that menu
0:19:03item
0:19:05and actually used is you i for an obligation we need to call G T
0:19:11K application setup menu
0:19:14and a good place to do that is in the startup before
0:19:19of your energy application
0:19:21i mentioned earlier that you application as a number of different entry points like it
0:19:24has an active right does it open or you could activated by directly calling in
0:19:28action
0:19:29and how you activated how you started there's always a startup different that it gets
0:19:35caught no matter what
0:19:37so that's a good place to do things that you want to happen in all
0:19:40the cases
0:19:41because if you have to actually
0:19:44get a lot
0:19:46you are funded i just so
0:19:48and then we
0:19:50well you get the menu model
0:19:52that the data constructed format and we called you get jic application setup menu
0:19:57which does all the work behind the scenes just this puts us stuff on the
0:20:01bus on the session but also the show picks it up from there so that's
0:20:04a lot of things that are happening behind the scenes of that's right
0:20:12right i did not really get into the difference between finer primary and secondary instance
0:20:16but you're so right points out that G application as this concept of single instance
0:20:21which are briefly mentioned earlier and that means there's a primary instance which is actually
0:20:27fourty flash running application and if you start again on the command line it's not
0:20:32gonna open set second binary but just
0:20:34talk to the primary instance
0:20:36and the startup function i said it gets run no matter what it only gets
0:20:40run in the province but if you're if you're starting at or second time and
0:20:43doesn't actually launch something them started with not
0:20:51okay that's a fair point
0:20:54going back to this i said earlier in a financial to you have a if
0:20:58you to be mention applications like each item as an associated action
0:21:02and so we need to somehow bring these actions into
0:21:05into being and that's what what's happening actually four lines up here
0:21:10we call a function called G action map at actually entries
0:21:15which is
0:21:17also a lot of work that's happening by the scenes that school of a little
0:21:20bit
0:21:21you can actually see the add entries irate if you pass in there
0:21:25this looks very similar to what we what we have and how to indicate for
0:21:28the longest time which is a G T K action entry every
0:21:33and this is just basically the same kind of idea translated into G action sort
0:21:38of detection
0:21:41so we are creating to actions one is as the name preferences minus on this
0:21:44and it could
0:21:46just a student to do that you saw the U I five before
0:21:49and we have you be also specify the activate callbacks you like could activated it's
0:21:54called in the collection is activated preferences activated escort
0:21:58when preferences you preference actions activated
0:22:03that's actually try that out
0:22:07so not to step for
0:22:12that you have to have an
0:22:14vision and you know yes it's there so the shell has successfully picked up
0:22:20menu the other people on the bus
0:22:22and that S which it shows of the preferences and could menu item
0:22:27no one click on preferences
0:22:30nothing happens that's because the preferences activity function that i just is percent these of
0:22:34us nothing
0:22:36exciting is going on but it is fully functional
0:22:40just works and a little bit want to show that
0:22:44you may not more may not what is it but for the for the could
0:22:47i don't actually specified a keyboard accelerator people talk out in the U I for
0:22:53the expected one controlled you
0:22:55and when i had control to here
0:22:57also works or that is already hooked up
0:23:01and the next that will be to make the preferences menu item actually something
0:23:06well that i'm moving on to the next step
0:23:10which is
0:23:12soon so how preferences work
0:23:14and
0:23:17we want our preferences obviously to be remembered from one run of the application for
0:23:21the next are we gonna use G settings to number them
0:23:25and for using G settings the first step is always to that you need a
0:23:30schema for a settings
0:23:32which is another type of X M L file actually here
0:23:35is fairly minimal scheme are just system to settings and it the one is
0:23:39a font the unless a transition time
0:23:45there's some magic that you need to do some magic intent incantations that you need
0:23:49to do to make it make use of the scheme or you have to compile
0:23:53it but you have to like
0:23:55installed icexml from the right location and then you call gina comply schemas to
0:24:01it's gotta be have some autoconf
0:24:04macros to make that
0:24:06the little easier if you're using all the tools
0:24:09so i'm not gonna dive into the details of how to do that let's just
0:24:11assume
0:24:12that we can figure that out
0:24:15and so now we have a disk in that case
0:24:19which means you can actually now use our settings and for that
0:24:24we need to quality settings new to obtain an instance of our settings
0:24:29object
0:24:31and
0:24:33the next thing we do is we use a very convenient functionality of T settings
0:24:36which is finding
0:24:38so we have this settings here actually earlier which is about the other which was
0:24:43called transition
0:24:44and we just find that too
0:24:47remember pressed accuracy
0:24:49it's a pointer that points to the do you can stack which is that we
0:24:54have in our window somewhere
0:24:57and the do you can stack it's a property that's called transition type
0:25:02and i would just by deciding to the
0:25:04to the property
0:25:06and that's all we need to do to make the reject reactor the changes of
0:25:10the setting
0:25:18there's some educated and i'm not gonna get into right now
0:25:22it's even better than
0:25:23then i'm telling
0:25:24so let's
0:25:30let's see if i can actually because
0:25:33so remember we don't have a preference dialogue get that we have hooked up to
0:25:37setting service
0:25:38going to see and if i can actually
0:25:42prove to you that if i don't change the settings
0:25:46on the command line using the G settings commitment to
0:25:51i hope that something is
0:25:53as i mean i was gonna less impressive that wanted because the window was hidden
0:25:56but you can see that the
0:25:58the application actually picked up my phone so strange before was one space to open
0:26:02autumn especially
0:26:05but obviously using the command line for these kind of changes it's not ideal so
0:26:08we want to
0:26:09a preference dialogue so that that's move on and constructive
0:26:17obviously be we use all the same things that we've already used to be again
0:26:21right attempted five for this dialogue this time it's a
0:26:25it's a subclass of you could dialogue can see appear
0:26:29and i'm not gonna go to listen detail but you can see that we populated
0:26:32that they
0:26:34some labels and the data from that they're gonna use for the phone probably obviously
0:26:39and the little further down
0:26:42is a combo box that using for the this transition property which is three possible
0:26:46values
0:26:48and i'm specifying them right in the in the template
0:26:56and then
0:26:59you obviously a great a subclass of ticket dialogue for this
0:27:02using the standard
0:27:04so there's all the same one i played and i showed you for our occasional
0:27:08you find type of private that business
0:27:11and we do the same tended finding that we did for vacation and when this
0:27:17time you do it for a preference dialogue
0:27:21we again obtain an instance of our settings you
0:27:25percent X
0:27:27and again we use the settings finding functionality combine
0:27:31or settings this time to bite into the controls we have in the dialogue actually
0:27:37the changing
0:27:38so for the for the font setting the use the
0:27:41the functional
0:27:43and for the position settings use this combo box
0:27:47i didn't actually pointed out that the name of that budget in the time that
0:27:50five was position
0:27:54and
0:27:56there's a lot more part of it here
0:27:59on think we still have to do is
0:28:01we created this preferences activated callback for the action but it was empty so we
0:28:05know need to go back to it and
0:28:08make it actually created you instance of a preference dialogue and present that
0:28:16and
0:28:17so let's go back and see how that looks
0:28:30you can see of all font settings change from last one got remembered across to
0:28:35be stuff
0:28:36and
0:28:37no tricking preferences again and a test our preference that'll and it has the things
0:28:42that i pointed out earlier in the that so there's a one choose a
0:28:46chose the value that we just sat in the on the command line
0:28:50and that's the combo box for the transition
0:28:53just gonna briefly pause and show what it actually does
0:28:57change the slide
0:28:59and if i know change taps here
0:29:03actually any mates so this is a new feature indicates that
0:29:06as opposed to the old do you can notebook
0:29:09you can actually do nice animated transitions here the other one that i have it
0:29:13here in the preference dialogue i'm gonna show that as well as the cross fade
0:29:18so for change to that then
0:29:20you can kind of see the cross fade happening here
0:29:23so that's a nice new feature of you can stack which is made possible by
0:29:27all the frame based drawing like that owned it the last year
0:29:35okay well known
0:29:39this application starting to look like an application that's fairly minimal so will add a
0:29:43few more bits of functionality here
0:29:46the next that is very common and don't see application research that's obviously very central
0:29:50so i want to show how to make be
0:29:54research entry here that looks somewhat similar to what we have another one applications
0:29:59product we the use do you can search entry which is just a subclass of
0:30:04do you can feel it has a bit of extra functionality
0:30:08to make a certain like basically a button and it has see extra signal that
0:30:11kind of patches the changes things like that and then we used to do concerts
0:30:15but i would just and you a budget
0:30:18which lets you
0:30:20place such country and maybe some other divided you might need and content in relation
0:30:24to that
0:30:25in inside a
0:30:27toolbar model stick and slide in from the top
0:30:31let's see how we actually use those
0:30:35so they go back to our
0:30:38have that for application than or
0:30:40and the and if you extra things
0:30:44right we had a probable so they had a bar
0:30:48the be much easier to see that men i run the application and i'm just
0:30:50pointing out how this looks and they
0:30:52covered
0:30:56and
0:30:58no further down
0:31:00between the had about the stack you know put a search by
0:31:04the search but contains a search entry
0:31:07and
0:31:08what we also do here is
0:31:10we hook up this segment of for the search changed signal of the searching for
0:31:14you might you know that have that right so we don't have too many legal
0:31:17ninety six not connect to know
0:31:19so once again this reduces
0:31:22the amount of menu cool to have to be produced
0:31:26and obviously implementing search actually takes quite a bit of work i'm not gonna go
0:31:31to that in detail here but i just wanted to
0:31:34if you show that there see the main did to be for this work us
0:31:38having a second like he has touched exchange which gets called
0:31:43whenever you talk a new character in your surgery
0:31:47and then we would do magic was text you just to find the first match
0:31:50for that you know text
0:31:52and
0:31:54one vector
0:31:56like a couple again
0:32:02so it is well you can see the
0:32:05there's of like on is that all the button that i mentioned
0:32:08if i click that's
0:32:12so sparse lights in the such entry
0:32:15and i can type something like
0:32:21so just
0:32:22that's kinda need
0:32:26escape i think
0:32:29okay
0:32:31so
0:32:33that's already pretty good
0:32:36but you can at the present a little more functionality you before but i'm not
0:32:39so
0:32:41think it's a step eight of nine so i might actually gets too much steps
0:32:44supposed to learn that
0:32:47sidebar
0:32:50i really have to like wracked my brain to come up is some example that
0:32:55lets me put in as many of the new but just as possible so i
0:32:58cannot this let me let me know that that's totally ridiculous but at least it
0:33:03gets the don't drop down definitional do you can menu button did you can reveal
0:33:07and you can just box set
0:33:10so once again we
0:33:12go back into our tempted
0:33:14and we are just sort you that we added top to bottom
0:33:18we know at a menu button next to that that's down here you can menu
0:33:22button
0:33:26and then going for the down
0:33:28and maybe used to have the G T K stack
0:33:31we know
0:33:32wrap that inside you get box and
0:33:35put a
0:33:37a little extra
0:33:38before it is actually i was audible so we put something left
0:33:42which is a G T K with you know that contains a list box in
0:33:45the school window
0:33:49and
0:33:52it's a little more xml here to show
0:33:56i said that i put a menu button there i didn't actually tell you where
0:33:59the menus coming from that's yet another
0:34:02the U I for that actually here
0:34:04which is really virtually identical to the syntax of the one that i showed you
0:34:09polyak menu it's just another
0:34:11you i five to be find a gym anymore
0:34:14in this case i just put a single item in there right now
0:34:18just a label words and they know the action here words
0:34:23and obviously i need to tell you where that actually comes from
0:34:27so we go back to this is actually to go back you can
0:34:32i so i called action show works but actually the U I five says when
0:34:36dot show words
0:34:38the window hottest this goebbels the action so the actions we saw before for the
0:34:42application manoeuvre applications goal actions which we defined in
0:34:47in the startup function of the application
0:34:50but there can also be we know school actions
0:34:53and the can i mention here is that you refer to those by putting went
0:34:57off as the prefix the name
0:35:00and obviously in brno school action should not be defined in the G application startup
0:35:05function but it should be specific to the rental so we at that action in
0:35:09the in the function of our example than a class
0:35:13and the last three lines that actually but it happens
0:35:17in this case we use a settings actually
0:35:22which is a neat little this integrate to take one of audio settings
0:35:27in this case it's setting called sure words and just wrap actually and actually wanted
0:35:33and
0:35:35activating the action will have that we change the value of the setting
0:35:40this case the setting this is leon and
0:35:45the settings action who just probably and every time you activated
0:35:49that's a very convenient way to make settings available to the you live in the
0:35:53form of actions
0:35:56and but that i'm switching back to show you know that looks
0:36:06okay so
0:36:08next a lot of the button up there
0:36:10is to get something you know
0:36:13menu button
0:36:15click connect
0:36:16is the menu item that i just
0:36:18mystified
0:36:19and if i actually
0:36:21product
0:36:23decide partials up and you saw that it actually slides and that's what the really
0:36:27knows doing it cannot that's the animated
0:36:30reveal
0:36:31and inside they really lazy
0:36:35in this box here this block so i could can spend an entire talked us
0:36:38talking about do you can this box and what that's about it doesn't do but
0:36:42it is essentially it's just a container that is
0:36:45it's meant to contain lots of digits and it has
0:36:48functionality that you normally associate with the but that review like it can filter can
0:36:53consult the items that are contained in it
0:36:56but the to the defining difference between this and the triggers that
0:37:01it shows actually is that which it it's not a seven day which is kind
0:37:05of a different layout model so this is nice if you want to have a
0:37:08list
0:37:09but you want to have actual july and it's not necessarily just data-driven
0:37:14giant data is
0:37:16and since i have to come up to something for this example adjust
0:37:19created buttons one button for each button my text and if i click on one
0:37:23of those buttons
0:37:25research again so this december
0:37:28make this example but meaningful
0:37:37right
0:37:40and i just saw the movie to hide itself again
0:37:43so we don't
0:37:46almost and this is the last step
0:37:48but i've been about them of this like first it had only it's that's actually
0:37:51and then ryan came back to me and said okay just reason like probably actions
0:37:57because that's need to so i went back and i racked my brain a little
0:38:01more and try to come up with some way of showing property actions
0:38:05so what what's that about
0:38:09which is all and a topic so if you have lots of useful properties and
0:38:13it's a it's a said earlier these settings action but it just showed it's a
0:38:16very convenient way to make settings accessible to do you want to from corrections
0:38:21and there similarly G property action does the same thing for properties of widget object
0:38:29and
0:38:30we'll see how that works
0:38:33so i'm not going in all the details here but just explaining what what's happening
0:38:38here we have seen to have to go back to our camp that again and
0:38:41be i'm adding a two labels
0:38:43pulled out of our
0:38:45the names are lines label lines actually get again just talk about it and then
0:38:52we go to our
0:38:54the U I for it defines the geeky a menu
0:38:57and be out at the second item there
0:39:00the name lines and
0:39:02but they are the new action show lines
0:39:05which now would be a property action
0:39:08so i have to show you know that is done
0:39:11and again it's done in the in a function of all in the class and
0:39:15it is the first line there's
0:39:17G property actually you so we specify the name show lines and then we
0:39:23we use the lines object
0:39:24and you probably expect by now that pretty lines is another
0:39:29point a very banal prime instructed gets magically populated finally
0:39:34gee wouldn't you can window class pine temperature a lot well
0:39:38so that's for that one little that we just added
0:39:42and use the visible property of the label and we have another boolean target actually
0:39:47here
0:39:48and
0:39:50yet another thing that i squeezed in this last that is that
0:39:54but only can be do that but we can also
0:39:58use
0:39:59object binding here logistic in a nice way to basically connect properties of different objects
0:40:05and keep them and so
0:40:07so that's what we're using here to assess at the at to labels but we
0:40:10always want them to become visible invisible together so we can adjust we use do
0:40:16you object buying property to just connect the visible property of these two widgets
0:40:21so when i when i show the first one the second one automatically get shown
0:40:24as well
0:40:29let me show you look something about it yes
0:40:54okay so
0:40:56rest of them here's our new menu item lines i just quit that
0:41:00metropolis
0:41:02to label simply here
0:41:04and show you the code for actually counting the lines the text
0:41:07as well that that's interesting to taps
0:41:11it actually a baseline count you
0:41:14and if i top and the property again
0:41:18most of them disappeared the same time because that was the properties are all together
0:41:24and
0:41:26that was the last step so i'm actually
0:41:30and on the my samples
0:41:32i'll be and what that and if you have any questions free to ask
0:41:35thanks to take a break from this i hope are but it's actually really not
0:41:40hard automatic norm three style vacation using
0:41:43bits and pieces that are available in typically master now so it's tickets we can
0:41:47all of this would be
0:41:49would be at your disposal and
0:41:52actually did a line count you on the last step you that most complete example
0:41:56that i have comes onto some five hundred lines of C code and some two
0:42:00hundred lines of you across
0:42:03so that's not too bad considering it see
0:42:09no i that i used to be a for this
0:42:13but i hope late what we have to it as well that's just
0:42:18yes
0:42:26can repeat the question mark
0:42:30okay
0:42:31yes this first of all as i said earlier these examples including all the makefile
0:42:38integration everything is available the G T K source tree so you can go then
0:42:42local actually that this that's make for the yams
0:42:46there's also a various documentation for instance the i pointed out at some point is
0:42:51that we should some macros in G I L actually for the for the schema
0:42:55compilation part and there's a link that's of the G I O documentation but that's
0:42:59explain
0:43:00and
0:43:01maybe have documentation for some for the resource part of so an actual about that
0:43:07okay so some of this might not be wrapped a nice macros
0:43:11but some of it is and for the parts that are there should be documentation
0:43:15somewhere inside the G I O documentation but that's not necessarily easy to find so
0:43:20i try to put links to that in this
0:43:29right that's a that's a good exactly actually
0:43:33so there's a there's a nice you way of writing documentation hold how do i
0:43:37that wind kicked off and this drumming
0:43:40drumming for which
0:43:44that that's available i think it's a one about resources maybe not yet but
0:43:48we should make one available
0:43:55so there's more questions or nothing i want to say is that this is the
0:43:59location where you can actually find all of all of this online this is the
0:44:03D A P I documentation where
0:44:05that i just wanted to other point out that i found a few box and
0:44:09in the documentation gonna bend over this last night so but i showed you was
0:44:13my local fixed build and that will be all our online but the next you
0:44:18can release
0:44:19and this is a the G T K sources and you can see the night
0:44:23subdirectories where i ran
0:44:25these examples
0:44:31thank you next time
0:44:36and questions
0:44:39okay thank you