Skip to content
Snippets Groups Projects
Commit e19ce3d3 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Nachbereitung 14.1.2019

parent 4ff440ea
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -73,7 +73,7 @@
\item[6.1] Konzepte und Ziele
\color{red}
\item[6.2] Beispiel: Zahlen und Buchstaben
\item[6.3] Beispiel: Graphische Benutzeroberfläche (GUI)
\item[6.3] Unions
\vspace*{-\smallskipamount}
\item[\dots]
\end{itemize}
......@@ -508,48 +508,6 @@
\end{frame}
\subsection{Beispiel: Graphische Benutzeroberfläche (GUI)}
\begin{frame}[fragile]
\showsubsection
\scriptsize
\begin{lstlisting}
#include <gtk/gtk.h>
int main (int argc, char **argv)
{
gtk_init (&argc, &argv);
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Hello");
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
GtkWidget *label = gtk_label_new ("Hello, world!");
gtk_container_add (GTK_CONTAINER (vbox), label);
GtkWidget *button = gtk_button_new_with_label ("Quit");
g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
gtk_container_add (GTK_CONTAINER (vbox), button);
gtk_widget_show (button);
gtk_widget_show (label);
gtk_widget_show (vbox);
gtk_widget_show (window);
gtk_main ();
return 0;
}
\end{lstlisting}
\vspace*{-6cm}\strut\hfill
\includegraphics[scale=0.85]{hello-gtk.png}\\[2cm]
\begin{flushright}
\normalsize\bf Praktikumsversuch:\\
Objektorientiertes Zeichenprogramm
\end{flushright}
\end{frame}
\subsection{Unions}
\begin{frame}[fragile]
......@@ -788,6 +746,48 @@
\end{itemize}
\end{frame}
\subsection{Beispiel: Graphische Benutzeroberfläche (GUI)}
\begin{frame}[fragile]
\showsubsection
\scriptsize
\begin{lstlisting}
#include <gtk/gtk.h>
int main (int argc, char **argv)
{
gtk_init (&argc, &argv);
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Hello");
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
GtkWidget *vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
GtkWidget *label = gtk_label_new ("Hello, world!");
gtk_container_add (GTK_CONTAINER (vbox), label);
GtkWidget *button = gtk_button_new_with_label ("Quit");
g_signal_connect (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
gtk_container_add (GTK_CONTAINER (vbox), button);
gtk_widget_show (button);
gtk_widget_show (label);
gtk_widget_show (vbox);
gtk_widget_show (window);
gtk_main ();
return 0;
}
\end{lstlisting}
\vspace*{-6cm}\strut\hfill
\includegraphics[scale=0.85]{hello-gtk.png}\\[2cm]
\begin{flushright}
\normalsize\bf Praktikumsversuch:\\
Objektorientiertes Zeichenprogramm
\end{flushright}
\end{frame}
\subsection{Ausblick: C++}
\begin{frame}[fragile]
......@@ -877,9 +877,9 @@
\color{medgreen}
\item[6.1] Konzepte und Ziele
\item[6.2] Beispiel: Zahlen und Buchstaben
\item[6.3] Beispiel: Graphische Benutzeroberfläche (GUI)
\item[6.4] Unions
\item[6.5] Virtuelle Methoden
\item[6.3] Unions
\item[6.4] Virtuelle Methoden
\item[6.5] Beispiel: Graphische Benutzeroberfläche (GUI)
\item[6.6] Ausblick: C++
\end{itemize}
\item[\textbf{7}] \textbf{Datenstrukturen}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment