mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
Moved from mwh.sysrq.dk
svn path=/trunk/gtk-sharp/; revision=9185
This commit is contained in:
parent
3a108845d7
commit
701aba3e4a
@ -1,7 +1,14 @@
|
||||
2002-11-16 Johannes Roith <johannes@jroith.de>
|
||||
|
||||
* Convert to XHTML
|
||||
|
||||
2002-11-09 Johannes Roith <johannes@jroith.de>
|
||||
|
||||
2002-11-25 Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||
|
||||
* Moved webcontent from mwh.sysrq.dk into the repository
|
||||
* Is now available from http://www.go-mono.com/gnometutorial
|
||||
* Rollback XHTML conversion
|
||||
* Changed writers.html to PEOPLE and IDEAS
|
||||
|
||||
2002-11-16 Johannes Roith <johannes@jroith.de>
|
||||
|
||||
* Convert to XHTML
|
||||
|
||||
2002-11-09 Johannes Roith <johannes@jroith.de>
|
||||
|
||||
* Initial import Martin Willemoes Hansen's tutorial and move stylesheets to an separate file
|
22
gnometutorial/IDEAS
Normal file
22
gnometutorial/IDEAS
Normal file
@ -0,0 +1,22 @@
|
||||
1. Some of the things you need (samples); can be re-used from the /sample
|
||||
directory in the gtk-sharp module. At least that is a start! :)
|
||||
|
||||
Richard Torkar
|
||||
|
||||
2. My suggestion is to make a small application that would show
|
||||
programmers how to build a full application, pick a target application
|
||||
(for example you could pick the `same-gnome' game) and build it from
|
||||
zero:
|
||||
1. Creating your UI using glade.
|
||||
2. Connecting the Glade code to C#
|
||||
3. Making the program go.
|
||||
4. Using the Canvas/Drawing.
|
||||
5. Creating a configuration dialog box with Glade.
|
||||
6. Loading configuration settings from GConf.
|
||||
7. Storing scores on a database.
|
||||
8. Internationalization.
|
||||
9. Adding an About Box and a logo
|
||||
10. Making the executable self-contained
|
||||
11. Creating a custom widget.
|
||||
|
||||
Miguel de Icaza
|
@ -15,4 +15,4 @@ please keep to these guidelines.
|
||||
your code here
|
||||
</pre>
|
||||
|
||||
3. Use the default gt+ theme and (optionally) the crux WM theme for screenshots
|
||||
3. Use the default gtk+2 theme and (optionally) the crux WM theme for screenshots
|
17
gnometutorial/PEOPLE
Normal file
17
gnometutorial/PEOPLE
Normal file
@ -0,0 +1,17 @@
|
||||
Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||
Maintainer
|
||||
Work on the framework of the tutorial.
|
||||
|
||||
Johannes Roith <johannes@jroith.de>
|
||||
Work on the Glade# part.
|
||||
|
||||
Pablo Baena <pbaena@uol.com.ar>
|
||||
Threads stuff, Eclipse/mono/gtk#/glade#/glib# sections.
|
||||
Is working on a front-end for Mencoder, which could be used as a sample.
|
||||
|
||||
Raciel <raciel@x0und.net>
|
||||
Gtk# (right now porting the gtk tutorial to c#)
|
||||
|
||||
Luyan <nluyan@163.net>
|
||||
Chinese translation.
|
||||
|
BIN
gnometutorial/bindings/gtk-sharp/base.png
Normal file
BIN
gnometutorial/bindings/gtk-sharp/base.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
569
gnometutorial/bindings/gtk-sharp/gtk-sharp.html
Normal file
569
gnometutorial/bindings/gtk-sharp/gtk-sharp.html
Normal file
@ -0,0 +1,569 @@
|
||||
<html>
|
||||
<title>GTK#</title>
|
||||
<body>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../../style.css" />
|
||||
|
||||
<h1>GTK#</h1>
|
||||
by Johannes Roith (<a href="mailto:johannes@jroith.de">johannes@jroith.de</a>) [if you contribute to this chapter please add your name here]<br>
|
||||
This chapter does use some content from the GTK+ Tutorial by Tony Gale, Ian Main, & the GTK team
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
GTK (GIMP Toolkit) is a library for creating graphical user interfaces. It is licensed using the LGPL license, so you can develop open software, free software, or even commercial non-free software using GTK without having to spend anything for licenses or royalties.
|
||||
<br><br>
|
||||
It's called the GIMP toolkit because it was originally written for developing the GNU Image Manipulation Program (GIMP), but GTK has now been used in a large number of software projects, including the GNU Network Object Model Environment (GNOME) project. GTK is built on top of GDK (GIMP Drawing Kit) which is basically a wrapper around the low-level functions for accessing the underlying windowing functions (Xlib in the case of the X windows system), and gdk-pixbuf, a library for client-side image manipulation.
|
||||
|
||||
<h2>HelloWorld, first try</h2>
|
||||
|
||||
HelloWorld in Gtk#:
|
||||
|
||||
|
||||
|
||||
<table cellpadding=5 border=0>
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<pre class="code">
|
||||
using Gtk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
|
||||
class Hello {
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
Window window = new Window ("helloworld");
|
||||
window.Show();
|
||||
|
||||
Application.Run ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</pre>
|
||||
</td>
|
||||
<td valign=top><img src=base.png border=0></td>
|
||||
</tr></table>
|
||||
|
||||
|
||||
[compile: mcs helloworld.cs -r gtk-sharp.dll -r glib-sharp.dll]<br><br>
|
||||
It's a bit longer than console hello world and needs some explanation.<br><br>
|
||||
Before we jump in the Main method, every GTK# Application will have to import the namespaces:
|
||||
<pre class="code">
|
||||
using Gtk;
|
||||
using GtkSharp;
|
||||
</pre>
|
||||
If you don't do so, each Class from one of these namespaces needs the namespace mentioned as prefix.<br>
|
||||
<br>
|
||||
In Main() at first you see:
|
||||
<pre class="code">Application.Init()</pre>
|
||||
This initializes GTK and is needed in every GTK# Application.<br>
|
||||
The next line create a new window. GTK# can set the title in the constructor and saves one line compared to C.<br>
|
||||
<pre class="code">
|
||||
Window window = new Window ("helloworld");
|
||||
</pre>
|
||||
<pre class="code">Application.Run()</pre> shows the application and most importantly keeps it open, waiting for events, until Quit() is called.
|
||||
<h2>HelloWorld, second try</h2>
|
||||
While the above program compiles and runs, it's doesn't quit, properly. You've to exit with CRTL+C.<br><br>
|
||||
|
||||
<pre class="code">
|
||||
|
||||
using Gtk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
|
||||
class Hello {
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
Window window = new Window ("helloworld");
|
||||
window.DeleteEvent += new DeleteEventHandler (delete_event);
|
||||
window.ShowAll ();
|
||||
|
||||
Button btn = new Button ("Hello World");
|
||||
btn.Clicked += new EventHandler (hello);
|
||||
|
||||
Application.Run ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void delete_event (object obj, DeleteEventArgs args)
|
||||
{
|
||||
Application.Quit ();
|
||||
}
|
||||
|
||||
static void hello (object obj, EventArgs args)
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
Application.Quit ();
|
||||
}
|
||||
}
|
||||
|
||||
</pre>
|
||||
This sample quits correctly.<br>
|
||||
|
||||
GTK is an event driven toolkit, which means it will sleep in Application.Run() until an event occurs and control is passed to the appropriate function. GTK# can make use of the type "event". When you close HelloWorld, the DeleteEvent is thrown, by the window.
|
||||
To enable your application to react on the DeleteEvent, you must connect it to an event handler.
|
||||
<pre class="code">
|
||||
window.DeleteEvent += new DeleteEventHandler (delete_event);
|
||||
</pre>
|
||||
An event handler is passed an object, the object that fired the event, here window, and EventArgs. The EventArgs here have the special type DeleteEventArgs).
|
||||
<pre class="code">
|
||||
static void delete_event (object obj, DeleteEventArgs args)
|
||||
{
|
||||
Application.Quit ();
|
||||
}
|
||||
</pre>
|
||||
This sample also adds a button to the window and connects the clicked event to "hello".
|
||||
<h2>Packing Widgets (Boxes)</h2>
|
||||
|
||||
When creating an application, you'll want to put more than one widget inside a window. Our first helloworld example only used one widget so we could simply use a window.Add() call to "pack" the widget into the window. But when you want to put more than one widget into a window, how do you control where that widget is positioned? This is where packing comes in.<br><br>
|
||||
If you come from Windows, you're probably used to position several widgets using coordinates. Also possible, that's not the way it's done in GTK#. Most packing is done by creating boxes. These are invisible widget containers that we can pack our widgets into which come in two forms, a horizontal box, and a vertical box. While this is more difficult for a newcomer it has some advantages:
|
||||
<ul>
|
||||
<li>Independent of screesize</li>
|
||||
<li>Easier Internationalization</li>
|
||||
</ul>
|
||||
|
||||
When packing widgets into a horizontal box, the objects are inserted horizontally from left to right or right to left depending on the call used. In a vertical box, widgets are packed from top to bottom or vice versa. You may use any combination of boxes inside or beside other boxes to create the desired effect.<br><br>
|
||||
An object may be another container or a widget. In fact, many widgets are actually containers themselves, including the button, but we usually only use a label inside a button.<br><br>
|
||||
|
||||
By using these calls, GTK knows where you want to place your widgets so it can do automatic resizing and other nifty things. There are also a number of options as to how your widgets should be packed. As you can imagine, this method gives us a quite a bit of flexibility when placing and creating widgets.<br><br>
|
||||
<br>
|
||||
[TODO]
|
||||
|
||||
<h2>A closer look at Buttons</h2>
|
||||
GTK# offers not just the normal button, but some other types, derived from it.
|
||||
<h3>Using Stock Icons</h3>
|
||||
Up to now, we only created Buttons containing a label. It's possible to create a
|
||||
Button from Stock Icon, which is very good for consistency in Gnome apps:<br>
|
||||
<br>
|
||||
Common look & feel: Toolbar with 4 Stock Icons.<br>
|
||||
<img src="stockicons.png" border=0>
|
||||
<br>
|
||||
<pre class="code">
|
||||
Button stockbutton = Button.FromStock(<b>stocktype</b>);
|
||||
</pre>
|
||||
Gtk# offers a wide range of good-looking, well designed and accessible icons.
|
||||
Anopther benfit of Stock Icons is, that they are available in many languages,
|
||||
and there is no need, to translate them.
|
||||
<b>stocktype</b> must be one of these values:
|
||||
<pre class="code">
|
||||
Gtk.Stock.Add
|
||||
Gtk.Stock.Apply
|
||||
Gtk.Stock.Bold
|
||||
Gtk.Stock.Cancel
|
||||
Gtk.Stock.Cdrom
|
||||
Gtk.Stock.Clear
|
||||
Gtk.Stock.Close
|
||||
Gtk.Stock.Convert
|
||||
Gtk.Stock.Copy
|
||||
Gtk.Stock.Cut
|
||||
Gtk.Stock.Delete
|
||||
Gtk.Stock.DialogError
|
||||
Gtk.Stock.DialogInfo
|
||||
Gtk.Stock.DialogQuestion
|
||||
Gtk.Stock.DialogWarning
|
||||
Gtk.Stock.StockDnd
|
||||
Gtk.Stock.DndMultiple
|
||||
Gtk.Stock.Execute
|
||||
Gtk.Stock.FIND
|
||||
Gtk.Stock.FIND_AND_REPLACE
|
||||
Gtk.Stock.FLOPPY
|
||||
Gtk.Stock.GOTO_BOTTOM
|
||||
Gtk.Stock.GOTO_FIRST
|
||||
Gtk.Stock.GOTO_LAST
|
||||
Gtk.Stock.GOTO_TOP
|
||||
Gtk.Stock.GO_BACK
|
||||
Gtk.Stock.GO_DOWN
|
||||
Gtk.Stock.GO_FORWARD
|
||||
Gtk.Stock.GO_UP
|
||||
Gtk.Stock.HELP
|
||||
Gtk.Stock.HOME
|
||||
Gtk.Stock.INDEX
|
||||
Gtk.Stock.ITALIC
|
||||
Gtk.Stock.JUMP_TO
|
||||
Gtk.Stock.JUSTIFY_CENTER
|
||||
Gtk.Stock.JUSTIFY_FILL
|
||||
Gtk.Stock.JUSTIFY_LEFT
|
||||
Gtk.Stock.JUSTIFY_RIGHT
|
||||
Gtk.Stock.MISSING_IMAGE
|
||||
Gtk.Stock.NEW
|
||||
Gtk.Stock.NO
|
||||
Gtk.Stock.OK
|
||||
Gtk.Stock.OPEN
|
||||
Gtk.Stock.PASTE
|
||||
Gtk.Stock.PREFERENCES
|
||||
Gtk.Stock.PRINT
|
||||
Gtk.Stock.PRINT_PREVIEW
|
||||
Gtk.Stock.PROPERTIES
|
||||
Gtk.Stock.QUIT
|
||||
Gtk.Stock.REDO
|
||||
Gtk.Stock.REFRESH
|
||||
Gtk.Stock.REMOVE
|
||||
Gtk.Stock.REVERT_TO_SAVED
|
||||
Gtk.Stock.SAVE
|
||||
Gtk.Stock.SAVE_AS
|
||||
Gtk.Stock.SELECT_COLOR
|
||||
Gtk.Stock.SELECT_FONT
|
||||
Gtk.Stock.SORT_ASCENDING
|
||||
Gtk.Stock.SORT_DESCENDING
|
||||
Gtk.Stock.SPELL_CHECK
|
||||
Gtk.Stock.STOP
|
||||
Gtk.Stock.STRIKETHROUGH
|
||||
Gtk.Stock.UNDELETE
|
||||
Gtk.Stock.UNDERLINE
|
||||
Gtk.Stock.UNDO
|
||||
Gtk.Stock.YES
|
||||
Gtk.Stock.ZOOM_100
|
||||
Gtk.Stock.ZOOM_FIT
|
||||
Gtk.Stock.ZOOM_IN
|
||||
Gtk.Stock.ZOOM_OUT
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
<h3>Custom Buttons</h3>
|
||||
You can put pretty much everything in the button. A often used example is a button with icon and label.
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Toggle Buttons</h3>
|
||||
|
||||
ToggleButtons are similiar to the normal button, but when clicked, may be depressed, and when you click again,
|
||||
they will pop back up. Click again, and they will pop back down. When popped down, the Property Active has the value "true".
|
||||
|
||||
<pre class="code">
|
||||
using Gtk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
public class checkbuttons
|
||||
{
|
||||
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
Application.Init();
|
||||
|
||||
|
||||
Window window = new Window("toggle buttons");
|
||||
|
||||
window.DeleteEvent += new DeleteEventHandler (delete_event);
|
||||
|
||||
<b>/* Creating a new ToggleButton*/
|
||||
|
||||
ToggleButton togglebutton = new ToggleButton ("button1");</b>
|
||||
togglebutton.Clicked += new EventHandler (clickedCallback);
|
||||
|
||||
|
||||
window.Add(togglebutton);
|
||||
window.ShowAll();
|
||||
|
||||
Application.Run();
|
||||
|
||||
}
|
||||
|
||||
static void delete_event (object obj, DeleteEventArgs args)
|
||||
{
|
||||
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
static void clickedCallback (object obj, EventArgs args)
|
||||
{
|
||||
<b>/* Check Active Property */</b>
|
||||
|
||||
if (((ToggleButton) obj).<b>Active</b>)
|
||||
Console.WriteLine ("ToggleButton clicked, I'm activating");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>Check Buttons</h3>
|
||||
Check Buttons are squares with text besides them. From a programmers point of view, they work like ToggleButtons.
|
||||
|
||||
<pre class="code">
|
||||
CheckButton cb1 = new CheckButton ("CheckButton 1");
|
||||
</pre>
|
||||
<h3>Radio Buttons</h3>
|
||||
<br>
|
||||
[TODO]: Sample needs explanation.
|
||||
|
||||
<pre class="code">
|
||||
|
||||
using Gtk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
|
||||
public class radiobuttons
|
||||
{
|
||||
|
||||
static GLib.SList group = null;
|
||||
|
||||
static void delete_event (object obj, DeleteEventArgs args)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
static void exitbutton_event (object obj, EventArgs args)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
Application.Init();
|
||||
|
||||
|
||||
Window window = new Window("radio buttons");
|
||||
|
||||
window.DeleteEvent += new DeleteEventHandler (delete_event);
|
||||
|
||||
window.BorderWidth = 0;
|
||||
|
||||
VBox box1 = new VBox (false, 0);
|
||||
window.Add(box1);
|
||||
box1.Show();
|
||||
|
||||
VBox box2 = new VBox (false, 10);
|
||||
box2.BorderWidth = 10;
|
||||
box1.PackStart(box2, true, true, 0);
|
||||
box2.Show();
|
||||
|
||||
RadioButton radiobutton = new RadioButton (null, "button1");
|
||||
box2.PackStart(radiobutton, true, true, 0);
|
||||
radiobutton.Show();
|
||||
group = radiobutton.Group;
|
||||
RadioButton radiobutton2 = new RadioButton(group, "button2");
|
||||
radiobutton2.Active = true;
|
||||
box2.PackStart(radiobutton2, true, true, 0);
|
||||
radiobutton2.Show();
|
||||
|
||||
RadioButton radiobutton3 = RadioButton.NewWithLabelFromWidget(radiobutton, "button3");
|
||||
box2.PackStart(radiobutton3, true, true, 0);
|
||||
radiobutton3.Show();
|
||||
|
||||
HSeparator separator = new HSeparator ();
|
||||
box1.PackStart (separator,false, true, 0);
|
||||
separator.Show();
|
||||
|
||||
VBox box3 = new VBox(false, 10);
|
||||
box3.BorderWidth = 10;
|
||||
box1.PackStart(box3,false, true, 0);
|
||||
box3.Show();
|
||||
|
||||
Button button = new Button ("close");
|
||||
button.Clicked += new EventHandler (exitbutton_event);
|
||||
|
||||
box3.PackStart(button, true, true, 0);
|
||||
button.CanDefault = true;
|
||||
button.GrabDefault();
|
||||
button.Show();
|
||||
|
||||
window.ShowAll();
|
||||
|
||||
Application.Run();
|
||||
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2>Container Widgets</h2>
|
||||
[TODO]
|
||||
<h2>Miscellaneous Widgets</h2>
|
||||
This section describes some often used widgets, but is not a complete reference. A more complete
|
||||
listing will be available in the GTK# port of the GTK+ 2.0 tutorial or the GTK# documentation.
|
||||
<h3>Labels</h3>
|
||||
Creating a new Label...
|
||||
<pre class="code">
|
||||
Label label1 = new Label("Caption");
|
||||
</pre>
|
||||
A new feature makes it possible, to use simple styles in label captions. It's called GMarkup and is similiar to HTML:
|
||||
<pre class="code">
|
||||
Label label1 = new Label("A <span color=\"blue\">blue</span> <big>and</big> <b>bold</b> label");
|
||||
</pre>
|
||||
This line is rendered like that:<br><br>
|
||||
<img src=label.png border=0><br><br>
|
||||
The feature is possible, thanks to pango, that is discussed later.
|
||||
<br><br>
|
||||
The label text can be justified using:
|
||||
<pre class="code">
|
||||
label1.Justify = jtype;
|
||||
</pre>
|
||||
jtype must be a value of the Justification enumeration:
|
||||
<pre class="code">
|
||||
Justification.Left
|
||||
Justification.Right
|
||||
Justification.Center
|
||||
Justification.Fill
|
||||
</pre>
|
||||
The label widget is also capable of line wrapping the text automatically. This can be activated using:
|
||||
<pre class="code">
|
||||
label1.LineWrap = true;
|
||||
</pre>
|
||||
The wrap argument takes a true or false value.
|
||||
<br>
|
||||
The text can be underlined:
|
||||
<pre class="code">
|
||||
label1.Pattern = "_________________________ _ _________ _ ______ __ _______ ___";
|
||||
</pre>
|
||||
|
||||
An example application, using labels can be viewed here: <a href="label.cs">label.cs</a>
|
||||
<h3>Using Tooltips</h3>
|
||||
Tooltips are boxes with some text, that can be shown, when the mouse moves over a widget.
|
||||
<br>
|
||||
|
||||
<pre class="code">
|
||||
Tooltips tooltip1 = new Tooltips();
|
||||
tooltip1.SetTip(button1, "Click on this button to exit", null)
|
||||
</pre>
|
||||
|
||||
You can use the same tooltip object for all widgets. This makes sense, because you can then enable/disable all tooltips easily:
|
||||
<pre class="code">
|
||||
tooltip1.Enable();
|
||||
tooltip1.Disable();
|
||||
</pre>
|
||||
<h3>Progress Bars</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Statusbar</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Color Selection</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>File Selection</h3>
|
||||
The Gnome FileOpen/Close Dialog.
|
||||
[TODO]
|
||||
<h3>Font Selection</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Message Dialog</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Tree View</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h3>Text View</h3>
|
||||
<br>
|
||||
[TODO]
|
||||
<h2>Using Drag & Drop</h2>
|
||||
|
||||
|
||||
|
||||
<h2>Widget Overview</h2>
|
||||
|
||||
|
||||
<h3>Widget Hierarchy</h3>
|
||||
Here is the class hierarchy tree used to implement widgets:
|
||||
<pre class="code">
|
||||
GObject
|
||||
|
|
||||
GtkObject
|
||||
+GtkWidget
|
||||
| +GtkMisc
|
||||
| | +GtkLabel
|
||||
| | | `GtkAccelLabel
|
||||
| | +GtkArrow
|
||||
| | `GtkImage
|
||||
| +GtkContainer
|
||||
| | +GtkBin
|
||||
| | | +GtkAlignment
|
||||
| | | +GtkFrame
|
||||
| | | | `GtkAspectFrame
|
||||
| | | +GtkButton
|
||||
| | | | +GtkToggleButton
|
||||
| | | | | `GtkCheckButton
|
||||
| | | | | `GtkRadioButton
|
||||
| | | | `GtkOptionMenu
|
||||
| | | +GtkItem
|
||||
| | | | +GtkMenuItem
|
||||
| | | | +GtkCheckMenuItem
|
||||
| | | | | `GtkRadioMenuItem
|
||||
| | | | +GtkImageMenuItem
|
||||
| | | | +GtkSeparatorMenuItem
|
||||
| | | | `GtkTearoffMenuItem
|
||||
| | | +GtkWindow
|
||||
| | | | +GtkDialog
|
||||
| | | | | +GtkColorSelectionDialog
|
||||
| | | | | +GtkFileSelection
|
||||
| | | | | +GtkFontSelectionDialog
|
||||
| | | | | +GtkInputDialog
|
||||
| | | | | `GtkMessageDialog
|
||||
| | | | `GtkPlug
|
||||
| | | +GtkEventBox
|
||||
| | | +GtkHandleBox
|
||||
| | | +GtkScrolledWindow
|
||||
| | | `GtkViewport
|
||||
| | +GtkBox
|
||||
| | | +GtkButtonBox
|
||||
| | | | +GtkHButtonBox
|
||||
| | | | `GtkVButtonBox
|
||||
| | | +GtkVBox
|
||||
| | | | +GtkColorSelection
|
||||
| | | | +GtkFontSelection
|
||||
| | | | `GtkGammaCurve
|
||||
| | | `GtkHBox
|
||||
| | | +GtkCombo
|
||||
| | | `GtkStatusbar
|
||||
| | +GtkFixed
|
||||
| | +GtkPaned
|
||||
| | | +GtkHPaned
|
||||
| | | `GtkVPaned
|
||||
| | +GtkLayout
|
||||
| | +GtkMenuShell
|
||||
| | | +GtkMenuBar
|
||||
| | | `GtkMenu
|
||||
| | +GtkNotebook
|
||||
| | +GtkSocket
|
||||
| | +GtkTable
|
||||
| | +GtkTextView
|
||||
| | +GtkToolbar
|
||||
| | `GtkTreeView
|
||||
| +GtkCalendar
|
||||
| +GtkDrawingArea
|
||||
| | `GtkCurve
|
||||
| +GtkEditable
|
||||
| | +GtkEntry
|
||||
| | `GtkSpinButton
|
||||
| +GtkRuler
|
||||
| | +GtkHRuler
|
||||
| | `GtkVRuler
|
||||
| +GtkRange
|
||||
| | +GtkScale
|
||||
| | | +GtkHScale
|
||||
| | | `GtkVScale
|
||||
| | `GtkScrollbar
|
||||
| | +GtkHScrollbar
|
||||
| | `GtkVScrollbar
|
||||
| +GtkSeparator
|
||||
| | +GtkHSeparator
|
||||
| | `GtkVSeparator
|
||||
| +GtkInvisible
|
||||
| +GtkPreview
|
||||
| `GtkProgressBar
|
||||
+GtkAdjustment
|
||||
+GtkCellRenderer
|
||||
| +GtkCellRendererPixbuf
|
||||
| +GtkCellRendererText
|
||||
| +GtkCellRendererToggle
|
||||
+GtkItemFactory
|
||||
+GtkTooltips
|
||||
`GtkTreeViewColumn
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
BIN
gnometutorial/bindings/gtk-sharp/label.png
Normal file
BIN
gnometutorial/bindings/gtk-sharp/label.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
gnometutorial/bindings/gtk-sharp/stockicons.png
Normal file
BIN
gnometutorial/bindings/gtk-sharp/stockicons.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
97
gnometutorial/ide/eclipse.html
Normal file
97
gnometutorial/ide/eclipse.html
Normal file
@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Eclipse for developing Mono applications</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Eclipse for developing Mono applications</h1>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
<p>When you visit Eclipse's <a href="http://eclipse.org/">web page</a>,
|
||||
you may wonder what Eclipse is: some Java library, an IDE, just and editor?
|
||||
The answer is: all of the three.
|
||||
The Eclipse Platform (as <a href="http://eclipse.org/whitepapers/eclipse-overview.pdf">
|
||||
this</a> white paper states) is designed for building integrated development
|
||||
environments (IDEs) that can be used to create applications as diverse as web
|
||||
sites, embedded Java programs, C++ programs, and Enterprise JavaBeans.
|
||||
What does it mean? That apart from initially having just an editor with
|
||||
a few shortcuts for doing several common programming tasks easier, you can
|
||||
extend the IDE to any language creating plug-ins that can run on any OS
|
||||
that Eclipse is ported to.</p>
|
||||
|
||||
<p>With the multi-language nature of Mono, this seems to be a very
|
||||
important project for future development of applications in this
|
||||
framework. But even now it can be a very helpful IDE for developing
|
||||
C# applications. There is already a basic C# plug-in for Eclipse,
|
||||
that although lacking some interesting features, implements
|
||||
auto indenting and syntax highlighting for this language.
|
||||
Another extra point is that Eclipse can use the Gtk2 toolkit
|
||||
on GNU/Linux. This is great for Gnome users, as it adapts better
|
||||
to the environment.</p>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>First things first. You must get Eclipse from the
|
||||
<a href="http://eclipse.org/downloads/index.html">download</a> section.
|
||||
Choose any release you want to download and you'll be presented
|
||||
with different packages of the Eclipse platform. Unless you are planning
|
||||
to work in a plug-in for Eclipse, downloading the Platform Runtime Binary
|
||||
for your OS will suffice (and will save you lots of bandwith).
|
||||
Also remember that you will need a Java runtime environment (JRE),
|
||||
that you can get following the instructions in the download page,
|
||||
or from <a href="http://java.sun.com/j2se/">Sun</a>'s site.</p>
|
||||
|
||||
<p>The installation of the Eclipse platform is very quick and simple.
|
||||
You just have to unzip the downloaded file in a directory, and from
|
||||
there running the eclipse executable (you must have the JRE path
|
||||
in your PATH environment variable).
|
||||
The loading process is rather slow, but not slower than a few other
|
||||
native applications out there.</P>
|
||||
|
||||
<p>Next you will want to install <a href="http://www.improve-technologies.com">
|
||||
Improve</a>'s <a href="http://www.improve-technologies.com/alpha/esharp/">C#
|
||||
plug-in</a>. Follow the instructions on the plug-in site.</P>
|
||||
|
||||
<p>Optionally, if you plan to be working on C/C++ code any time, you can
|
||||
download the C Development Environment from the
|
||||
<a href="http://www.eclipse.org/tools/index.html">Tools Project</a>.
|
||||
Just unzipping the plug-in on the Eclipse directory will suffice.</p>
|
||||
|
||||
<h2>Using Eclipse</h2>
|
||||
|
||||
<p>You can start a new C# project just by going to "File->New->Project"
|
||||
and choosing 'Simple' on the dialog presented. Your newly created
|
||||
project will appear at the Navigator on the left. You can now
|
||||
start creating the layout of your project. You can do this by
|
||||
using the context menu on the Navigator or by using the "File->New" menu.
|
||||
To create a C# file you must use "New->C# File". The file will be filled
|
||||
with a simple template of a C# program.</P>
|
||||
|
||||
<p>Let's say you want to import the newly created project to a CVS
|
||||
repository you have access to. On the context menu
|
||||
of the Navigator you have the "Team->Share Project" item. By clicking
|
||||
on it you will get the chance to configure the CVS repository
|
||||
settings, and then you will be presented with the Synchronize view
|
||||
to see the files that will be added, and then you can choose which
|
||||
ones to add to version control and which to ignore.</P>
|
||||
|
||||
<p>To check out a CVS module follow this procedure. Go to
|
||||
"Window->Open Perspective->CVS Repository Exploring", then right click on
|
||||
the "CVS Repositories" window and choose "New->Repository Location"
|
||||
and fill in the dialog with your login settings.
|
||||
You can then expand the CVS tree, right-click on a directory and
|
||||
choose "Check Out As Project".</p>
|
||||
|
||||
<p>From now on you can experiment with the rest of the features.
|
||||
You will be surprised at how stable and intuitive this application is.</p>
|
||||
|
||||
<p>
|
||||
<small>Acknowledge: some things were used from this
|
||||
<a href="http://www.gnomedesktop.org/article.php?sid=724">post</a> on
|
||||
www.gnomedesktop.org.</small>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,59 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Emacs</title>
|
||||
<link rel="stylesheet" type="text/css" href="../style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Emacs</h1>
|
||||
|
||||
<h2><a id="introduction">Introduction</a></h2>
|
||||
|
||||
Emacs is a general purpose editor ie. not an IDE specificaly
|
||||
designed for .net and c#. <br />
|
||||
It is my experience that Emacs along with Glade and the Mono
|
||||
tools makes a powerfull and productive development environment.
|
||||
<p>Strengths about emacs:</p>
|
||||
|
||||
<ul>
|
||||
<li>Has support for almost every programming language you can
|
||||
mention</li>
|
||||
|
||||
<li>Is portable and thus available at all major computing
|
||||
platforms.</li>
|
||||
|
||||
<li>Easily extendable.</li>
|
||||
|
||||
<li>Its free software.</li>
|
||||
</ul>
|
||||
|
||||
For more information about emacs refer to <a
|
||||
href="http://www.gnu.org/software/emacs/emacs.html">this</a>
|
||||
<h2><a id="modes">Modes</a></h2>
|
||||
|
||||
By default there is no c# mode available in emacs (21.2). Luckily
|
||||
there is some third party modes available here:
|
||||
<ul>
|
||||
<li><a href="http://davh.dk/script/">davh.dk</a></li>
|
||||
|
||||
<li><a
|
||||
href="http://www.cybercom.net/~zbrad/DotNet/Emacs/">www.cybercom.net</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="qae">Questions and exercises</a></h2>
|
||||
|
||||
<ol>
|
||||
<li>Write HelloWorld.cs with emacs.</li>
|
||||
|
||||
<li>Note which special features each c# mode has and compare
|
||||
them.</li>
|
||||
</ol>
|
||||
|
||||
<h2><a id="credits">Credits</a></h2>
|
||||
|
||||
Author: <a href="mailto:mwh%20at%20sysrq.dk">Martin Willemoes
|
||||
Hansen</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Emacs</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
|
||||
<h1>Emacs</h1>
|
||||
|
||||
<a id="introduction"><h2>Introduction</h2></a>
|
||||
Emacs is a general purpose editor ie. not an IDE specificaly designed for .net and c#.
|
||||
<br>It is my experience that Emacs along with Glade and the Mono tools makes a powerfull and productive development environment.
|
||||
<p>Strengths about emacs:
|
||||
<ul>
|
||||
<li>Has support for almost every programming language you can mention
|
||||
<li>Is portable and thus available at all major computing platforms.
|
||||
<li>Easily extendable.
|
||||
<li>Its free software.
|
||||
</ul>
|
||||
|
||||
For more information about emacs refer to <a href="http://www.gnu.org/software/emacs/emacs.html">this</a>
|
||||
|
||||
<a id="modes"><h2>Modes</h2></a>
|
||||
By default there is no c# mode available in emacs (21.2).
|
||||
Luckily there is some third party modes available here:
|
||||
<ul>
|
||||
<li><a href="http://davh.dk/script/">davh.dk</a>
|
||||
<li><a href="http://www.cybercom.net/~zbrad/DotNet/Emacs/">www.cybercom.net</a>
|
||||
</ul>
|
||||
|
||||
<a id="qae"><h2>Questions and exercises</h2></a>
|
||||
<ol>
|
||||
<li>Write HelloWorld.cs with emacs.
|
||||
<li>Note which special features each c# mode has and compare them.
|
||||
</ol>
|
||||
|
||||
<a id="credits"><h2>Credits</h2></a>
|
||||
Author: <a href="mailto:mwh at sysrq.dk">Martin Willemoes Hansen</a>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,133 +1,87 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>The Gnome.NET Tutorial</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>The Gnome.NET Tutorial First Edition</h1>
|
||||
|
||||
<h2>A Much Needed Room For Breath</h2>
|
||||
|
||||
<img src="frontpage.png" />
|
||||
<p><a href="writers.html">Contributors, Ideas etc</a></p>
|
||||
|
||||
<h3>Contents</h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><b><a href="preface.html">Preface</a></b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Chapter 1</td>
|
||||
<td><b>Mono</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><a href="mono.html#about">About the Mono Technology</a><br />
|
||||
<a href="mono.html#mylife">How Will Mono Technology Change My
|
||||
Life?</a><br />
|
||||
<a href="mono.html#hello">HelloWorld</a><br />
|
||||
<a href="mono.html#html">Architecture</a><br />
|
||||
<a href="mono.html#tools">Tools</a><br />
|
||||
<a href="mono.html#kernel">Linux kernel support for
|
||||
binaries</a><br />
|
||||
<a href="mono.html#qae">Questions and exercises</a><br />
|
||||
<a href="mono.html#credits">Credits</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Chapter 2</td>
|
||||
<td><b>IDEs</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><a href="ide/emacs.html">Emacs</a><br />
|
||||
Eclipse<br />
|
||||
#develop</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Chapter 3</td>
|
||||
<td><b>C# bindings</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Introduction<br />
|
||||
Gtk#<br />
|
||||
Gdk#<br />
|
||||
Glib#<br />
|
||||
Atk#<br />
|
||||
Pango#<br />
|
||||
Gnome#<br />
|
||||
<a href="bindings/glade/glade.html">Glade#</a><br />
|
||||
GConf#<br />
|
||||
Gda#<br />
|
||||
Gnome-db#<br />
|
||||
GStreamer#<br />
|
||||
Questions and exercises</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Chapter 4</td>
|
||||
<td><b>Testing & UI Design</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>NUnit<br />
|
||||
GNOME Human Interface Guidelines</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Chapter 5</td>
|
||||
<td><b>Cases</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Same Gnome<br />
|
||||
E-mail client<br />
|
||||
Web browser<br />
|
||||
Text editor</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Appendix A</td>
|
||||
<td><b>Ressources</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><a href="ressources.html#api">API References</a><br />
|
||||
<a href="ressources.html#code">Code samples</a><br />
|
||||
<a href="ressources.html#apps">Applications</a><br />
|
||||
<a href="ressources.html#tutorials">Tutorials</a><br />
|
||||
<a href="ressources.html#presentations">Presentations</a><br />
|
||||
<a href="ressources.html#whitepapers">Whitepapers</a><br />
|
||||
<a href="ressources.html#website">Websites</a><br />
|
||||
<a href="ressources.html#irc">IRC</a><br />
|
||||
<a href="ressources.html#books">Books</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Appendix B</td>
|
||||
<td><b>Credits</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Authors<br />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>The Gnome.NET Tutorial</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<h1>The Gnome.NET Tutorial First Edition</h1>
|
||||
<h2>A Much Needed Room To Breathe</h2>
|
||||
|
||||
<img src=frontpage.png>
|
||||
|
||||
<h3>Contents</h3>
|
||||
|
||||
<table>
|
||||
<tr><td></td><td><b><a href="preface.html">Preface</a></b></td></tr>
|
||||
<tr><td>Chapter 1</td><td><b>Mono</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
<a href="mono.html#about">About the Mono Technology</a><br>
|
||||
<a href="mono.html#mylife">How Will Mono Technology Change My Life?</a><br>
|
||||
<a href="mono.html#hello">HelloWorld</a><br>
|
||||
<a href="mono.html#html">Architecture</a><br>
|
||||
<a href="mono.html#tools">Tools</a><br>
|
||||
<a href="mono.html#kernel">Linux kernel support for binaries</a><br>
|
||||
<a href="mono.html#qae">Questions and exercises</a><br>
|
||||
<a href="mono.html#credits">Credits</a>
|
||||
</td></tr>
|
||||
|
||||
<tr><td>Chapter 2</td><td><b>IDEs</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
<a href="ide/emacs.html">Emacs</a><br>
|
||||
<a href="ide/eclipse.html">Eclipse</a><br>
|
||||
#develop
|
||||
</td></tr>
|
||||
|
||||
<tr><td>Chapter 3</td><td><b>C# bindings</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
Introduction<br>
|
||||
<a href="bindings/gtk-sharp/gtk-sharp.html">Gtk#</a><br>
|
||||
Gdk#<br>
|
||||
Glib#<br>
|
||||
Atk#<br>
|
||||
Pango#<br>
|
||||
Gnome#<br>
|
||||
<a href="bindings/glade/glade.html">Glade#</a><br>
|
||||
GConf#<br>
|
||||
Gda#<br>
|
||||
Gnome-db#<br>
|
||||
GStreamer#<br>
|
||||
Questions and exercises
|
||||
</td></tr>
|
||||
<tr><td>Chapter 4</td><td><b>Testing & UI Design</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
NUnit<br>
|
||||
GNOME Human Interface Guidelines
|
||||
</td></tr>
|
||||
|
||||
<tr><td>Chapter 5</td><td><b>Cases</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
Same Gnome<br>
|
||||
E-mail client<br>
|
||||
Web browser<br>
|
||||
Text editor
|
||||
</td></tr>
|
||||
|
||||
<tr><td>Appendix A</td><td><b>Resources</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
<a href="resources.html#api">API References</a><br>
|
||||
<a href="resources.html#code">Code samples</a><br>
|
||||
<a href="resources.html#apps">Applications</a><br>
|
||||
<a href="resources.html#tutorials">Tutorials</a><br>
|
||||
<a href="resources.html#presentations">Presentations</a><br>
|
||||
<a href="resources.html#whitepapers">Whitepapers</a><br>
|
||||
<a href="resources.html#website">Websites</a><br>
|
||||
<a href="resources.html#irc">IRC</a><br>
|
||||
<a href="resources.html#books">Books</a>
|
||||
</td></tr>
|
||||
|
||||
<tr><td>Appendix B</td><td><b>Credits</b></td></tr>
|
||||
<tr><td></td><td>
|
||||
Authors<br>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</center>
|
@ -1,84 +1,64 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Mono</h1>
|
||||
|
||||
<h2><a id="about">About the Mono Technology</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="mylife">How Will Mono Technology Change My
|
||||
Life?</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="hello">HelloWorld</a></h2>
|
||||
|
||||
<br />
|
||||
This is a must in every book or tutorial, a "Hello, World!"
|
||||
program, so here it is:
|
||||
<pre class="code">
|
||||
using System;
|
||||
|
||||
class Hello {
|
||||
static void Main() {
|
||||
Console.WriteLine ("Hello, World!");
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<kbd>mcs Hello.cs -o hello.exe<br />
|
||||
mono hello.exe or mint hello.exe</kbd>
|
||||
<h2><a id="arch">Architecture</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="tools">Tools</a></h2>
|
||||
|
||||
<h3>MonoDoc</h3>
|
||||
|
||||
<h3>Mono Compiler Suite (mcs)</h3>
|
||||
|
||||
<h3>Mono Interpreter (mint)</h3>
|
||||
|
||||
<h3>Mono Content dumper and disassembler (monodis)</h3>
|
||||
|
||||
<h3>Mono debugger</h3>
|
||||
|
||||
<h2><a id="kernel">Linux kernel support for binaries</a></h2>
|
||||
|
||||
You can make your mono .exe files executable by following these
|
||||
steps:
|
||||
<ol>
|
||||
<li>Enabling binfmt in your kernel.</li>
|
||||
|
||||
<li>Adding the line below to your fstab:<br />
|
||||
|
||||
<pre class="code">
|
||||
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>On boot run the cmd below:<br />
|
||||
|
||||
<pre class="code">
|
||||
echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>chmod +x foobar.exe</li>
|
||||
</ol>
|
||||
|
||||
Another way to accomplish the above is to wrap the <br />
|
||||
mono .exe file it in a shell script, like this:
|
||||
<pre class="code">
|
||||
#!/bin/sh
|
||||
/usr/bin/mono /usr/bin/mcs.exe "$@"
|
||||
</pre>
|
||||
|
||||
<h2><a id="qae">Questions and exercises</a></h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
|
||||
<h1>Mono</h1>
|
||||
|
||||
<a id="about"><h2>About the Mono Technology</h2></a><br>
|
||||
<a id="mylife"><h2>How Will Mono Technology Change My Life?</h2></a>
|
||||
Mono is enabling you to write desktop applications faster and leverage the existing GNOME platform as well as
|
||||
bringing you a new set of development tools.
|
||||
|
||||
<a id="hello"<h2>HelloWorld</h2></a>
|
||||
This is a must in every book or tutorial, a "Hello, World!" program, so here it is:
|
||||
|
||||
<pre class="code">
|
||||
using System;
|
||||
|
||||
class Hello {
|
||||
static void Main() {
|
||||
Console.WriteLine ("Hello, World!");
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<kbd>mcs Hello.cs -o hello.exe<br>
|
||||
mono hello.exe or
|
||||
mint hello.exe
|
||||
</kbd>
|
||||
|
||||
<a id="arch"><h2>Architecture</h2></a>
|
||||
|
||||
<a id="tools"><h2>Tools</h2></a>
|
||||
<h3>MonoDoc</h3>
|
||||
<h3>Mono Compiler Suite (mcs)</h3>
|
||||
<h3>Mono Interpreter (mint)</h3>
|
||||
<h3>Mono Content dumper and disassembler (monodis)</h3>
|
||||
<h3>Mono debugger</h3>
|
||||
|
||||
<a id="kernel"><h2>Linux kernel support for binaries</h2></a>
|
||||
You can make your mono .exe files executable by following these steps:
|
||||
<ol>
|
||||
<li>Enabling binfmt in your kernel.
|
||||
<li>Adding the line below to your fstab:<br>
|
||||
<pre class="code">binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none</pre>
|
||||
<li>On boot run the cmd below:<br>
|
||||
<pre class="code">echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register</pre>
|
||||
<li>chmod +x foobar.exe
|
||||
</ol>
|
||||
|
||||
Another way to accomplish the above is to wrap the <br>
|
||||
mono .exe file it in a shell script, like this:
|
||||
<pre class="code">
|
||||
#!/bin/sh
|
||||
/usr/bin/mono /usr/bin/mcs.exe "$@"
|
||||
</pre>
|
||||
|
||||
<a id="qae"><h2>Questions and exercises</h2></a>
|
||||
|
||||
<a id="credits"><h2>Credits</h2></a>
|
||||
Author: <a href="mailto:mwh at sysrq.dk">Martin Willemoes Hansen</a>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,84 +1,23 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title></title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Mono</h1>
|
||||
|
||||
<h2><a id="about">About the Mono Technology</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="mylife">How Will Mono Technology Change My
|
||||
Life?</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="hello">HelloWorld</a></h2>
|
||||
|
||||
<br />
|
||||
This is a must in every book or tutorial, a "Hello, World!"
|
||||
program, so here it is:
|
||||
<pre class="code">
|
||||
using System;
|
||||
|
||||
class Hello {
|
||||
static void Main() {
|
||||
Console.WriteLine ("Hello, World!");
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
<kbd>mcs Hello.cs -o hello.exe<br />
|
||||
mono hello.exe or mint hello.exe</kbd>
|
||||
<h2><a id="arch">Architecture</a></h2>
|
||||
|
||||
<br />
|
||||
<h2><a id="tools">Tools</a></h2>
|
||||
|
||||
<h3>MonoDoc</h3>
|
||||
|
||||
<h3>Mono Compiler Suite (mcs)</h3>
|
||||
|
||||
<h3>Mono Interpreter (mint)</h3>
|
||||
|
||||
<h3>Mono Content dumper and disassembler (monodis)</h3>
|
||||
|
||||
<h3>Mono debugger</h3>
|
||||
|
||||
<h2><a id="kernel">Linux kernel support for binaries</a></h2>
|
||||
|
||||
You can make your mono .exe files executable by following these
|
||||
steps:
|
||||
<ol>
|
||||
<li>Enabling binfmt in your kernel.</li>
|
||||
|
||||
<li>Adding the line below to your fstab:<br />
|
||||
|
||||
<pre class="code">
|
||||
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>On boot run the cmd below:<br />
|
||||
|
||||
<pre class="code">
|
||||
echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>chmod +x foobar.exe</li>
|
||||
</ol>
|
||||
|
||||
Another way to accomplish the above is to wrap the <br />
|
||||
mono .exe file it in a shell script, like this:
|
||||
<pre class="code">
|
||||
#!/bin/sh
|
||||
/usr/bin/mono /usr/bin/mcs.exe "$@"
|
||||
</pre>
|
||||
|
||||
<h2><a id="qae">Questions and exercises</a></h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Preface</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Preface</h2>
|
||||
|
||||
This tutorial is born out of a vision of a first place to go for High Level
|
||||
Gnome desktop programming.
|
||||
<br>The idea is to give application programmers an overview of the platform,
|
||||
<br>information about available development tools and sample code.
|
||||
|
||||
<h3>Who should read this tutorial?</h3>
|
||||
Programmers experienced with c#, who whish to get to understand and<br>
|
||||
develop desktop applications for the Gnome.NET platform.
|
||||
|
||||
<h3>How to read this tutorial</h3>
|
||||
You can read from the beginning to the end or you can
|
||||
skip around from topic to topic, no problemo.
|
||||
|
||||
</body>
|
||||
</html>
|
81
gnometutorial/resources.html
Normal file
81
gnometutorial/resources.html
Normal file
@ -0,0 +1,81 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Resources</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Resources</h1>
|
||||
|
||||
<a id="api"><h2>API References</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">gtk# API</a>
|
||||
<li><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp">MS Base Class API</a>
|
||||
</ul>
|
||||
|
||||
<a id="code"><h2>Code samples</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://primates.ximian.com/~duncan/Mono/">Sample gtk# applications</a>
|
||||
</ul>
|
||||
|
||||
<a id="apps"><h2>Applications</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://atoker.com/phonic/">Phonic</a>
|
||||
<li><a href="http://mwh.sysrq.dk/programs/programs.phtml">Jumpnbump frontend</a>
|
||||
</ul>
|
||||
|
||||
<a id="tuturials"><h2>Tutorials</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://toxic.magnesium.net/~hestilow/gconfsharp/intro.html">Using GConf#</a>
|
||||
</ul>
|
||||
|
||||
<a id="presentations"><h2>Presentations</h2></a>
|
||||
GUADEC 3 April 2002
|
||||
<ul>
|
||||
<li><a href="http://lagun.gnome-db.org/documentation/mono-slides/index.html">Mono (Spanish)</a>
|
||||
</ul>
|
||||
|
||||
.NET ONE 2002
|
||||
<ul>
|
||||
<li><a href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/DotNetOneKeynote.sxi">Keynote</a>
|
||||
<li><a href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/Mono_C_Sharp_Overview_1007.sxi">The Mono C# compiler</a>
|
||||
<li><a href="http://primates.ximian.com/~lupus/slides/embed/">Hosting the Mono Runtime</a>
|
||||
<ul>
|
||||
<li><a href="http://primates.ximian.com/~lupus/slides/embed/Mono-0.01.tar.gz">Quick hack to embed the mono runtime in a Perl module</a>
|
||||
</ul>
|
||||
<li><a href="http://primates.ximian.com/~lupus/slides/jit/">The Mono JIT Compiler</a>
|
||||
</ul>
|
||||
|
||||
Miscelaneous
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/Presentations/O-Reilly/">The Mono Project</a>
|
||||
<li><a href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/ETH.sxi">Mono (ETH University) 2002</a>
|
||||
<li><a href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/ZurichUniversity.sxi">Mono (Zurich University) 2002</a>
|
||||
<li><a href="http://primates.ximian.com/~miguel/slides-europe-nov-2002/HispaLinux.sxi">Mono (HispaLinux, Spanish) 2002</a>
|
||||
</ul>
|
||||
|
||||
<a id="whitepapers"><h2>Whitepapers</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://developer.ximian.com/articles/whitepapers/mono/">Mono</a>
|
||||
</ul>
|
||||
|
||||
<a id="websites"><h2>Websites</h2></a>
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.org">www.go-mono.org</a>
|
||||
<li><a href="http://www.atoker.com/mono">Mono for Debian</a>
|
||||
</ul>
|
||||
|
||||
<a id="irc"><h2>IRC</h2></a>
|
||||
<ul>
|
||||
<li><a href="irc://irc.gnome.org/mono">irc.gnome.org #mono</a>
|
||||
</ul>
|
||||
|
||||
<a id="books"<h2>Books</h2></a>
|
||||
<ul>
|
||||
<li>A Programmer's Introduction to C# by Eric Gunnerson
|
||||
<li>Advanced .NET Remoting by Ingo Rammer
|
||||
<li>ASP.NET in a Nutshell by G. Andrew Duthie & Matthew MacDonald
|
||||
<li>Programming ASP.NET by Jessy Liberty & Dan Hurtwitz
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,71 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Ressources</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ressources</h1>
|
||||
|
||||
<h2><a id="api">API References</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">gtk#
|
||||
API</a></li>
|
||||
|
||||
<li><a
|
||||
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp">
|
||||
MS Base Class API</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="code">Code samples</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://primates.ximian.com/~duncan/Mono/">Sample
|
||||
gtk# applications</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="apps">Applications</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://atoker.com/phonic/">Phonic</a></li>
|
||||
|
||||
<li><a
|
||||
href="http://mwh.sysrq.dk/programs/programs.phtml">Jumpnbump
|
||||
frontend</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="tuturials">Tutorials</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://toxic.magnesium.net/~hestilow/gconfsharp/intro.html">
|
||||
Using GConf#</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="websites">Websites</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.org">www.go-mono.org</a></li>
|
||||
|
||||
<li><a href="http://www.atoker.com/mono">Mono for Debian</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="irc">IRC</a></h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="irc://irc.freenode.org/mono">irc.freenode.org
|
||||
#mono</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a id="books">Books</a></h2>
|
||||
|
||||
<ul>
|
||||
<li>A Programmer's Introduction to C# by Eric Gunnerson</li>
|
||||
|
||||
<li>Advanced .NET Remoting: Ingo Rammer</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Writers section</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Writers section</h1>
|
||||
|
||||
<h2>Contributors</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="mailto:mwh%20at%20sysrq.dk">Martin Willemoes
|
||||
Hansen</a><br />
|
||||
Maintainer<br />
|
||||
Main focus: Work on the framework of the tutorial.</li>
|
||||
|
||||
<li><a href="mailto:johannes%20at%20jroith.de">Johannes
|
||||
Roith</a><br />
|
||||
Main focus: Work on the Glade# part.</li>
|
||||
|
||||
<li><a href="mailto:pbaena%20at%20uol.com.ar">Pablo
|
||||
Baena</a><br />
|
||||
Main focus: Threads stuff, Eclipse/mono/gtk#/glade#/glib#
|
||||
sections.<br />
|
||||
Is working on a front-end for Mencoder, which could be used as a
|
||||
sample.</li>
|
||||
|
||||
<li><a href="mailto:nluyan@163.net">Luyan</a><br />
|
||||
Chinese translation.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Ideas</h2>
|
||||
|
||||
<ol>
|
||||
<li>Some of the things you need (samples); can be re-used from
|
||||
the /sample directory in the gtk-sharp module. At least that is a
|
||||
start! :)<br />
|
||||
Richard Torkar</li>
|
||||
|
||||
<li>My suggestion is to make a small application that would show
|
||||
programmers how to build a full application, pick a target
|
||||
application (for example you could pick the `same-gnome' game)
|
||||
and build it from zero:
|
||||
<ul>
|
||||
<li>Creating your UI using glade.</li>
|
||||
|
||||
<li>Connecting the Glade code to C#</li>
|
||||
|
||||
<li>Making the program go.</li>
|
||||
|
||||
<li>Using the Canvas/Drawing.</li>
|
||||
|
||||
<li>Creating a configuration dialog box with Glade.</li>
|
||||
|
||||
<li>Loading configuration settings from GConf.</li>
|
||||
|
||||
<li>Storing scores on a database.</li>
|
||||
|
||||
<li>Internationalization.</li>
|
||||
|
||||
<li>Adding an About Box and a logo</li>
|
||||
|
||||
<li>Making the executable self-contained</li>
|
||||
|
||||
<li>Creating a custom widget.</li>
|
||||
</ul>
|
||||
|
||||
Miguel de Icaza</li>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user