summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2011-07-27 19:38:52 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2011-07-27 19:38:52 +0000
commitf86818b15e072e8cf45391f293e000a68ca19fb6 (patch)
tree052f2fdca94b8c5923fbd163acb6744c48cc4b87
parentae42e33e98dc0713bdd76a4c3c461bf8672331de (diff)
[elementary] Put dangling examples on the proper file.
SVN revision: 61814
-rw-r--r--doc/examples.dox237
-rw-r--r--src/lib/Elementary.h.in233
2 files changed, 237 insertions, 233 deletions
diff --git a/doc/examples.dox b/doc/examples.dox
index 191dba8d1..05ea48a2f 100644
--- a/doc/examples.dox
+++ b/doc/examples.dox
@@ -4364,6 +4364,243 @@
4364 */ 4364 */
4365 4365
4366/** 4366/**
4367 * @page tutorial_frame Frame example
4368 * @dontinclude frame_example_01.c
4369 *
4370 * In this example we are going to create 4 Frames with different styles and
4371 * add a rectangle of different color in each.
4372 *
4373 * We start we the usual setup code:
4374 * @until show(bg)
4375 *
4376 * And then create one rectangle:
4377 * @until show
4378 *
4379 * To add it in our first frame, which since it doesn't have it's style
4380 * specifically set uses the default style:
4381 * @until show
4382 *
4383 * And then create another rectangle:
4384 * @until show
4385 *
4386 * To add it in our second frame, which uses the "pad_small" style, note that
4387 * even tough we are setting a text for this frame it won't be show, only the
4388 * default style shows the Frame's title:
4389 * @until show
4390 * @note The "pad_small", "pad_medium", "pad_large" and "pad_huge" styles are
4391 * very similar, their only difference is the size of the empty area around
4392 * the content of the frame.
4393 *
4394 * And then create yet another rectangle:
4395 * @until show
4396 *
4397 * To add it in our third frame, which uses the "outdent_top" style, note
4398 * that even tough we are setting a text for this frame it won't be show,
4399 * only the default style shows the Frame's title:
4400 * @until show
4401 *
4402 * And then create one last rectangle:
4403 * @until show
4404 *
4405 * To add it in our fourth and final frame, which uses the "outdent_bottom"
4406 * style, note that even tough we are setting a text for this frame it won't
4407 * be show, only the default style shows the Frame's title:
4408 * @until show
4409 *
4410 * And now we are left with just some more setup code:
4411 * @until ELM_MAIN()
4412 *
4413 * Our example will look like this:
4414 *
4415 * @image html screenshots/frame_example_01.png
4416 * @image latex screenshots/frame_example_01.eps width=\textwidth
4417 *
4418 * @example frame_example_01.c
4419 */
4420
4421/**
4422 * @page tutorial_anchorblock_example Anchorblock/Anchorview example
4423 * This example will show both Anchorblock and @ref Anchorview,
4424 * since both are very similar and it's easier to show them once and side
4425 * by side, so the difference is more clear.
4426 *
4427 * We'll show the relevant snippets of the code here, but the full example
4428 * can be found here... sorry, @ref anchorblock_example_01.c "here".
4429 *
4430 * As for the actual example, it's just a simple window with an anchorblock
4431 * and an anchorview, both containing the same text. After including
4432 * Elementary.h and declaring some functions we'll need, we jump to our
4433 * elm_main (see ELM_MAIN) and create our window.
4434 * @dontinclude anchorblock_example_01.c
4435 * @skip int
4436 * @until const char
4437 * @until ;
4438 *
4439 * With the needed variables declared, we'll create the window and a box to
4440 * hold our widgets, but we don't need to go through that here.
4441 *
4442 * In order to make clear where the anchorblock ends and the anchorview
4443 * begins, they'll be each inside a @ref Frame. After creating the frame,
4444 * the anchorblock follows.
4445 * @skip elm_frame_add
4446 * @until elm_frame_content_set
4447 *
4448 * Nothing out of the ordinary there. What's worth mentioning is the call
4449 * to elm_anchorblock_hover_parent_set(). We are telling our widget that
4450 * when an anchor is clicked, the hover for the popup will cover the entire
4451 * window. This affects the area that will be obscured by the hover and
4452 * where clicking will dismiss it, as well as the calculations it does to
4453 * inform the best locations where to insert the popups content.
4454 * Other than that, the code is pretty standard. We also need to set our
4455 * callback for when an anchor is clicked, since it's our task to populate
4456 * the popup. There's no default for it.
4457 *
4458 * The anchorview is no different, we only change a few things so it looks
4459 * different.
4460 * @until elm_frame_content_set
4461 *
4462 * Then we run, so stuff works and close our main function in the usual way.
4463 * @until ELM_MAIN
4464 *
4465 * Now, a little note. Normally you would use either one of anchorblock or
4466 * anchorview, set your one callback to clicks and do your stuff in there.
4467 * In this example, however, there are a few tricks to make it easier to
4468 * show both widgets in one go (and to save me some typing). So we have
4469 * two callbacks, one per widget, that will call a common function to do
4470 * the rest. The trick is using ::Elm_Entry_Anchorblock_Info for the
4471 * anchorview too, since both are equal, and passing a callback to use
4472 * for our buttons to end the hover, because each widget has a different
4473 * function for it.
4474 * @until _anchorview_clicked_cb
4475 * @until }
4476 *
4477 * The meat of our popup is in the following function. We check what kind
4478 * of menu we need to show, based on the name set to the anchor in the
4479 * markup text. If there's no type (something went wrong, no valid contact
4480 * in the address list) we are just putting a button that does nothing, but
4481 * it's perfectly reasonable to just end the hover and call it quits.
4482 *
4483 * Our popup will consist of one main button in the middle of our hover,
4484 * and possibly a secondary button and a list of other options. We'll create
4485 * first our main button and check what kind of popup we need afterwards.
4486 * @skip static void
4487 * @skip static void
4488 * @until eina_stringshare_add
4489 * @until }
4490 *
4491 * Each button has two callbacks, one is our hack to close the hover
4492 * properly based on which widget it belongs to, the other a simple
4493 * printf that will show the action with the anchors own data. This is
4494 * not how you would usually do it. Instead, the common case is to have
4495 * one callback for the button that will know which function to call to end
4496 * things, but since we are doing it this way it's worth noting that
4497 * smart callbacks will be called in reverse in respect to the order they
4498 * were added, and since our @c btn_end_cb will close the hover, and thus
4499 * delete our buttons, the other callback wouldn't be called if we had
4500 * added it before.
4501 *
4502 * After our telephone popup, there are a few others that are practically
4503 * the same, so they won't be shown here.
4504 *
4505 * Once we are done with that, it's time to place our actions into our
4506 * hover. Main button goes in the middle without much questioning, and then
4507 * we see if we have a secondary button and a box of extra options.
4508 * Because I said so, secondary button goes on either side and box of
4509 * options either on top or below the main one, but to choose which
4510 * exactly, we use the hints our callback info has, which saves us from
4511 * having to do the math and see which side has more space available, with
4512 * a little special case where we delete our extra stuff if there's nowhere
4513 * to place it.
4514 * @skip url:
4515 * @skip }
4516 * @skip evas_object_smart
4517 * @until evas_object_del(box)
4518 * @until }
4519 * @until }
4520 *
4521 * The example will look like this:
4522 *
4523 * @image html screenshots/anchorblock_01.png
4524 * @image latex screenshots/anchorblock_01.eps width=\textwidth
4525 *
4526 * @example anchorblock_example_01.c
4527 */
4528
4529/**
4530 * @page tutorial_check Check example
4531 * @dontinclude check_example_01.c
4532 *
4533 * This example will show 2 checkboxes, one with just a label and the second
4534 * one with both a label and an icon. This example also ilustrates how to
4535 * have the checkbox change the value of a variable and how to react to those
4536 * changes.
4537 *
4538 * We will start with the usual setup code:
4539 * @until show(bg)
4540 *
4541 * And now we create our first checkbox, set its label, tell it to change
4542 * the value of @p value when the checkbox stats is changed and ask to be
4543 * notified of state changes:
4544 * @until show
4545 *
4546 * For our second checkbox we are going to set an icon so we need to create
4547 * and icon:
4548 * @until show
4549 * @note For simplicity we are using a rectangle as icon, but any evas object
4550 * can be used.
4551 *
4552 * And for our second checkbox we set the label, icon and state to true:
4553 * @until show
4554 *
4555 * We now do some more setup:
4556 * @until ELM_MAIN
4557 *
4558 * And finally implement the callback that will be called when the first
4559 * checkbox's state changes. This callback will use @p data to print a
4560 * message:
4561 * @until }
4562 * @note This work because @p data is @p value(from the main function) and @p
4563 * value is changed when the checkbox is changed.
4564 *
4565 * Our example will look like this:
4566 *
4567 * @image html screenshots/check_example_01.png
4568 * @image latex screenshots/check_example_01.eps width=\textwidth
4569 *
4570 * @example check_example_01.c
4571 */
4572
4573/**
4574 * @page tutorial_colorselector Color selector example
4575 * @dontinclude colorselector_example_01.c
4576 *
4577 * This example shows how to change the color of a rectangle using a color
4578 * selector. We aren't going to explain a lot of the code since it's the
4579 * usual setup code:
4580 * @until show(rect)
4581 *
4582 * Now that we have a window with background and a rectangle we can create
4583 * our color_selector and set it's initial color to fully opaque blue:
4584 * @until show
4585 *
4586 * Next we tell ask to be notified whenever the color changes:
4587 * @until changed
4588 *
4589 * We follow that we some more run of the mill setup code:
4590 * @until ELM_MAIN()
4591 *
4592 * And now get to the callback that sets the color of the rectangle:
4593 * @until }
4594 *
4595 * This example will look like this:
4596 *
4597 * @image html screenshots/colorselector_example_01.png
4598 * @image latex screenshots/colorselector_example_01.eps width=\textwidth
4599 *
4600 * @example colorselector_example_01.c
4601 */
4602
4603/**
4367 * @page slideshow_example Slideshow widget example 4604 * @page slideshow_example Slideshow widget example
4368 * 4605 *
4369 * This application is aimed to exemplify the slideshow widget. It 4606 * This application is aimed to exemplify the slideshow widget. It
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index 7cc66ec85..80227c33e 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -4327,60 +4327,6 @@ extern "C" {
4327 */ 4327 */
4328 4328
4329 /** 4329 /**
4330 * @page tutorial_frame Frame example
4331 * @dontinclude frame_example_01.c
4332 *
4333 * In this example we are going to create 4 Frames with different styles and
4334 * add a rectangle of different color in each.
4335 *
4336 * We start we the usual setup code:
4337 * @until show(bg)
4338 *
4339 * And then create one rectangle:
4340 * @until show
4341 *
4342 * To add it in our first frame, which since it doesn't have it's style
4343 * specifically set uses the default style:
4344 * @until show
4345 *
4346 * And then create another rectangle:
4347 * @until show
4348 *
4349 * To add it in our second frame, which uses the "pad_small" style, note that
4350 * even tough we are setting a text for this frame it won't be show, only the
4351 * default style shows the Frame's title:
4352 * @until show
4353 * @note The "pad_small", "pad_medium", "pad_large" and "pad_huge" styles are
4354 * very similar, their only difference is the size of the empty area around
4355 * the content of the frame.
4356 *
4357 * And then create yet another rectangle:
4358 * @until show
4359 *
4360 * To add it in our third frame, which uses the "outdent_top" style, note
4361 * that even tough we are setting a text for this frame it won't be show,
4362 * only the default style shows the Frame's title:
4363 * @until show
4364 *
4365 * And then create one last rectangle:
4366 * @until show
4367 *
4368 * To add it in our fourth and final frame, which uses the "outdent_bottom"
4369 * style, note that even tough we are setting a text for this frame it won't
4370 * be show, only the default style shows the Frame's title:
4371 * @until show
4372 *
4373 * And now we are left with just some more setup code:
4374 * @until ELM_MAIN()
4375 *
4376 * Our example will look like this:
4377 *
4378 * @image html screenshots/frame_example_01.png
4379 * @image latex screenshots/frame_example_01.eps width=\textwidth
4380 *
4381 * @example frame_example_01.c
4382 */
4383 /**
4384 * @defgroup Frame Frame 4330 * @defgroup Frame Frame
4385 * 4331 *
4386 * @image html img/widget/frame/preview-00.png 4332 * @image html img/widget/frame/preview-00.png
@@ -8328,113 +8274,6 @@ extern "C" {
8328 * try @ref tutorial_anchorblock_example "one". 8274 * try @ref tutorial_anchorblock_example "one".
8329 */ 8275 */
8330 /** 8276 /**
8331 * @page tutorial_anchorblock_example Anchorblock/Anchorview example
8332 * This example will show both Anchorblock and @ref Anchorview,
8333 * since both are very similar and it's easier to show them once and side
8334 * by side, so the difference is more clear.
8335 *
8336 * We'll show the relevant snippets of the code here, but the full example
8337 * can be found here... sorry, @ref anchorblock_example_01.c "here".
8338 *
8339 * As for the actual example, it's just a simple window with an anchorblock
8340 * and an anchorview, both containing the same text. After including
8341 * Elementary.h and declaring some functions we'll need, we jump to our
8342 * elm_main (see ELM_MAIN) and create our window.
8343 * @dontinclude anchorblock_example_01.c
8344 * @skip int
8345 * @until const char
8346 * @until ;
8347 *
8348 * With the needed variables declared, we'll create the window and a box to
8349 * hold our widgets, but we don't need to go through that here.
8350 *
8351 * In order to make clear where the anchorblock ends and the anchorview
8352 * begins, they'll be each inside a @ref Frame. After creating the frame,
8353 * the anchorblock follows.
8354 * @skip elm_frame_add
8355 * @until elm_frame_content_set
8356 *
8357 * Nothing out of the ordinary there. What's worth mentioning is the call
8358 * to elm_anchorblock_hover_parent_set(). We are telling our widget that
8359 * when an anchor is clicked, the hover for the popup will cover the entire
8360 * window. This affects the area that will be obscured by the hover and
8361 * where clicking will dismiss it, as well as the calculations it does to
8362 * inform the best locations where to insert the popups content.
8363 * Other than that, the code is pretty standard. We also need to set our
8364 * callback for when an anchor is clicked, since it's our task to populate
8365 * the popup. There's no default for it.
8366 *
8367 * The anchorview is no different, we only change a few things so it looks
8368 * different.
8369 * @until elm_frame_content_set
8370 *
8371 * Then we run, so stuff works and close our main function in the usual way.
8372 * @until ELM_MAIN
8373 *
8374 * Now, a little note. Normally you would use either one of anchorblock or
8375 * anchorview, set your one callback to clicks and do your stuff in there.
8376 * In this example, however, there are a few tricks to make it easier to
8377 * show both widgets in one go (and to save me some typing). So we have
8378 * two callbacks, one per widget, that will call a common function to do
8379 * the rest. The trick is using ::Elm_Entry_Anchorblock_Info for the
8380 * anchorview too, since both are equal, and passing a callback to use
8381 * for our buttons to end the hover, because each widget has a different
8382 * function for it.
8383 * @until _anchorview_clicked_cb
8384 * @until }
8385 *
8386 * The meat of our popup is in the following function. We check what kind
8387 * of menu we need to show, based on the name set to the anchor in the
8388 * markup text. If there's no type (something went wrong, no valid contact
8389 * in the address list) we are just putting a button that does nothing, but
8390 * it's perfectly reasonable to just end the hover and call it quits.
8391 *
8392 * Our popup will consist of one main button in the middle of our hover,
8393 * and possibly a secondary button and a list of other options. We'll create
8394 * first our main button and check what kind of popup we need afterwards.
8395 * @skip static void
8396 * @skip static void
8397 * @until eina_stringshare_add
8398 * @until }
8399 *
8400 * Each button has two callbacks, one is our hack to close the hover
8401 * properly based on which widget it belongs to, the other a simple
8402 * printf that will show the action with the anchors own data. This is
8403 * not how you would usually do it. Instead, the common case is to have
8404 * one callback for the button that will know which function to call to end
8405 * things, but since we are doing it this way it's worth noting that
8406 * smart callbacks will be called in reverse in respect to the order they
8407 * were added, and since our @c btn_end_cb will close the hover, and thus
8408 * delete our buttons, the other callback wouldn't be called if we had
8409 * added it before.
8410 *
8411 * After our telephone popup, there are a few others that are practically
8412 * the same, so they won't be shown here.
8413 *
8414 * Once we are done with that, it's time to place our actions into our
8415 * hover. Main button goes in the middle without much questioning, and then
8416 * we see if we have a secondary button and a box of extra options.
8417 * Because I said so, secondary button goes on either side and box of
8418 * options either on top or below the main one, but to choose which
8419 * exactly, we use the hints our callback info has, which saves us from
8420 * having to do the math and see which side has more space available, with
8421 * a little special case where we delete our extra stuff if there's nowhere
8422 * to place it.
8423 * @skip url:
8424 * @skip }
8425 * @skip evas_object_smart
8426 * @until evas_object_del(box)
8427 * @until }
8428 * @until }
8429 *
8430 * The example will look like this:
8431 *
8432 * @image html screenshots/anchorblock_01.png
8433 * @image latex screenshots/anchorblock_01.eps width=\textwidth
8434 *
8435 * @example anchorblock_example_01.c
8436 */
8437 /**
8438 * @addtogroup Anchorblock 8277 * @addtogroup Anchorblock
8439 * @{ 8278 * @{
8440 */ 8279 */
@@ -12239,49 +12078,6 @@ extern "C" {
12239 */ 12078 */
12240 12079
12241 /** 12080 /**
12242 * @page tutorial_check Check example
12243 * @dontinclude check_example_01.c
12244 *
12245 * This example will show 2 checkboxes, one with just a label and the second
12246 * one with both a label and an icon. This example also ilustrates how to
12247 * have the checkbox change the value of a variable and how to react to those
12248 * changes.
12249 *
12250 * We will start with the usual setup code:
12251 * @until show(bg)
12252 *
12253 * And now we create our first checkbox, set its label, tell it to change
12254 * the value of @p value when the checkbox stats is changed and ask to be
12255 * notified of state changes:
12256 * @until show
12257 *
12258 * For our second checkbox we are going to set an icon so we need to create
12259 * and icon:
12260 * @until show
12261 * @note For simplicity we are using a rectangle as icon, but any evas object
12262 * can be used.
12263 *
12264 * And for our second checkbox we set the label, icon and state to true:
12265 * @until show
12266 *
12267 * We now do some more setup:
12268 * @until ELM_MAIN
12269 *
12270 * And finally implement the callback that will be called when the first
12271 * checkbox's state changes. This callback will use @p data to print a
12272 * message:
12273 * @until }
12274 * @note This work because @p data is @p value(from the main function) and @p
12275 * value is changed when the checkbox is changed.
12276 *
12277 * Our example will look like this:
12278 *
12279 * @image html screenshots/check_example_01.png
12280 * @image latex screenshots/check_example_01.eps width=\textwidth
12281 *
12282 * @example check_example_01.c
12283 */
12284 /**
12285 * @defgroup Check Check 12081 * @defgroup Check Check
12286 * 12082 *
12287 * @image html img/widget/button/preview-00.png 12083 * @image html img/widget/button/preview-00.png
@@ -17454,35 +17250,6 @@ extern "C" {
17454 */ 17250 */
17455 17251
17456 /** 17252 /**
17457 * @page tutorial_colorselector Color selector example
17458 * @dontinclude colorselector_example_01.c
17459 *
17460 * This example shows how to change the color of a rectangle using a color
17461 * selector. We aren't going to explain a lot of the code since it's the
17462 * usual setup code:
17463 * @until show(rect)
17464 *
17465 * Now that we have a window with background and a rectangle we can create
17466 * our color_selector and set it's initial color to fully opaque blue:
17467 * @until show
17468 *
17469 * Next we tell ask to be notified whenever the color changes:
17470 * @until changed
17471 *
17472 * We follow that we some more run of the mill setup code:
17473 * @until ELM_MAIN()
17474 *
17475 * And now get to the callback that sets the color of the rectangle:
17476 * @until }
17477 *
17478 * This example will look like this:
17479 *
17480 * @image html screenshots/colorselector_example_01.png
17481 * @image latex screenshots/colorselector_example_01.eps width=\textwidth
17482 *
17483 * @example colorselector_example_01.c
17484 */
17485 /**
17486 * @defgroup Colorselector Colorselector 17253 * @defgroup Colorselector Colorselector
17487 * 17254 *
17488 * @{ 17255 * @{