You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add docs project and fix mistakes in existing Markdown files
The other platform projects have a proper Eclipse project set up for the
docs folder. Their contents are then embedded into the Eclipse website.
This change makes the existing docs folder of the SWT repository a
proper Eclipse project as well and fixes invalid Markdown in the
existing files. It prepares for the contents to be embedded in the
website.
Copy file name to clipboardExpand all lines: docs/gtk-dev-guide.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,7 +235,7 @@ To learn about SWT, try out the snippets and examples in the repository. Search
235
235
236
236
You should learn at least:
237
237
* Set of basic widgets (Button/Label/Table/Tree etc..)
238
-
* Layouts (Absolute[i.e no layout]/Grid/Row/Column/FormAttach)
238
+
* Layouts (Absolute, i.e no layout with Grid/Row/Column/FormAttach)
239
239
* Attaching listeners
240
240
241
241
**General Widget Hierarchy**
@@ -557,7 +557,7 @@ If you inspect a widget, in almost every createHandle() method, you will see the
557
557
558
558
This means that SWT is creating a new instance of the SWTFixed container. Normally it then assigns something to the handle variable puts the widgets inside it.
559
559
560
-
Usually in GTK you create a drawing surface (GdkWindow) [note the 'd'] and draw one or several widgets inside it. In SWT, we create a new drawing surface (GdkWindow) for every single widget. This is very ineffective but gives SWT more control about drawing order and permits easier implementation of overlapping widgets. At this point it might be beneficial to understand that a GdkWindow is a drawing surface, where as a GtkWindow[note 't vs d' difference] is a shell with decorations like 'X', '-' and it interacts with the X drawing system. More will be discussed in the GTK sections that follow.
560
+
Usually in GTK you create a drawing surface `GdkWindow` (note the 'd') and draw one or several widgets inside it. In SWT, we create a new drawing surface (GdkWindow) for every single widget. This is very ineffective but gives SWT more control about drawing order and permits easier implementation of overlapping widgets. At this point it might be beneficial to understand that a GdkWindow is a drawing surface, where as a `GtkWindow` (note 't vs d' difference) is a shell with decorations like 'X', '-' and it interacts with the X drawing system. More will be discussed in the GTK sections that follow.
561
561
562
562
**Technical C details**
563
563
@@ -992,7 +992,9 @@ Launch your SWT application. In terminal execute jps (java processes) and identi
992
992
2824 LayoutExample #<<< this is the SWT snippet.
993
993
994
994
As a side note, I often set the title of a snippet to the PID of the process. This way I don't have to look for it with jps anymore. To do this in java:
In Eclipse, press Ctrl+3, then search for 'Debug Attached Executable'. (I usually search for 'attached' and it pops up). Search for 'java'. You should see a list of multiple java processes. Pick the one that has the PID of your snippet:
998
1000
@@ -1052,7 +1054,7 @@ SWT Tools then copies code here (for debugging, don't edit as this folder is del
1052
1054
* This site is good for the conversion: http://www.binaryhexconverter.com/hex-to-decimal-converter
1053
1055
* You can also convert using the built in Long library in Java:
* Identify which GdkWindow maps to which GtkWidget using GtkInspector - see [images/Gdk_window.png](images/Gdk_window.png) or [images/README.md](images/README.md) for download instructions.
1057
+
* Identify which GdkWindow maps to which GtkWidget using GtkInspector - see [images/Gdk_window.png](images/Gdk_window.png)
1056
1058
* Remember to cast when writing native GTK applications:
1057
1059
* GtkWidget *button, sometimes a function can accept any widget
1058
1060
* Bug you need to cast to a particular widget, i.e.: ((GtkButton*)button)->x
0 commit comments