|
| 1 | +## External libraries: Desktop Graphical User Interfaces {#extern-gui} |
| 2 | + |
| 3 | +_Skeleton descriptions are typeset in italic text,_ |
| 4 | +_so please don't remove these descriptions when editing the topic._ |
| 5 | + |
| 6 | +### Overview |
| 7 | + |
| 8 | +_Provides a short natural language abstract of the module’s contents._ |
| 9 | +_Specifies the different levels of teaching._ |
| 10 | + |
| 11 | +------------------------------------------------------------------------ |
| 12 | +Level Objective |
| 13 | +----------------- ------------------------------------------------------ |
| 14 | +Foundational: Basic use of separate compilation |
| 15 | + |
| 16 | +Main: Command of supporting mechanisms and tools |
| 17 | + |
| 18 | +Advanced: Technicalities and tools |
| 19 | + |
| 20 | +------------------------------------------------------------------------ |
| 21 | + |
| 22 | +### Motivation |
| 23 | + |
| 24 | +_Why is this important?_ |
| 25 | +_Why do we want to learn/teach this topic?_ |
| 26 | + |
| 27 | +For some applications a graphical user interface is beneficial. However, graphical user inerfaces are not part of the C++ standard and external libaries are needed. We provide generic teaching goals and do not focus on a specific external library. Some mentionable libraries are: [Qt](https://www.qt.io/), [Cairo](https://www.cairographics.org/), and [wxWidgets](https://www.wxwidgets.org/). |
| 28 | + |
| 29 | +### Topic introduction |
| 30 | + |
| 31 | +_Very brief introduction to the topic._ |
| 32 | + |
| 33 | +### Foundational: Basic use of separate compilation |
| 34 | + |
| 35 | +#### Background/Required Knowledge |
| 36 | + |
| 37 | +A student: |
| 38 | + |
| 39 | +1. should know linking libraries |
| 40 | +2. should know [header files](../compilation-model/headers.md) |
| 41 | +3. should know about [build systems](../compilation-model/buildsystems.md) |
| 42 | + |
| 43 | +#### Student outcomes |
| 44 | + |
| 45 | +_A list of things "a student should be able to" after the curriculum._ |
| 46 | +_The next word should be an action word and testable in an exam._ |
| 47 | +_Max 5 items._ |
| 48 | + |
| 49 | +A student should be able to: |
| 50 | + |
| 51 | +1. link against the external library |
| 52 | +2. write an application with one window |
| 53 | +3. add simple widgets like text boxes and buttons to the window |
| 54 | +4. catch events of buttons or other elements |
| 55 | +5. explain the mechanicsm of event-driven programming |
| 56 | + |
| 57 | +#### Points to cover |
| 58 | + |
| 59 | +* use basic API functions |
| 60 | +* layout of the window |
| 61 | +* handle events by callbacks |
| 62 | + |
| 63 | +#### Caveats |
| 64 | + |
| 65 | +_This section mentions subtle points to understand, like anything resulting in |
| 66 | +implementation-defined, unspecified, or undefined behavior._ |
| 67 | + |
| 68 | +* programming user interfaces in C++ and in general require plenty of boiler plate code |
| 69 | +* API calls are specific to one library and might not be transferable to other libraries |
| 70 | +* Some libraries are written in C |
| 71 | + |
| 72 | +### Main: Command of supporting mechanisms and tools |
| 73 | + |
| 74 | +#### Background/Required Knowledge |
| 75 | + |
| 76 | +* All of the above. |
| 77 | + |
| 78 | +#### Student outcomes |
| 79 | + |
| 80 | +A student should be able to: |
| 81 | + |
| 82 | +1. add more advanced elements, like tables or images |
| 83 | +2. handle multiple windows |
| 84 | +3. show error and warning popups |
| 85 | +4. use different forms of IO, like keyboard, mouse, or touchpad |
| 86 | +5. explain basic of fonts and accesibilty |
| 87 | + |
| 88 | +#### Caveats |
| 89 | + |
| 90 | +* programming user interfaces is rather complex and might not applicable for most students |
| 91 | + |
| 92 | +#### Points to cover |
| 93 | + |
| 94 | +* More advanced API calls and design patterns |
| 95 | + |
| 96 | +### Advanced: Technicalities and tools |
| 97 | + |
| 98 | +_These are important topics that are not expected to be covered but provide |
| 99 | +guidance where one can continue to investigate this topic in more depth._ |
| 100 | + |
| 101 | +* Internationalization |
| 102 | +* Font desginers |
| 103 | +* Hardware accleration |
| 104 | +* Custom widget generation |
0 commit comments