aboutsummaryrefslogtreecommitdiffstatsci
path: root/README.md
blob: f76082e134a48e5207acf0213ac168818259206b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
CROW
=====

CROW stands for 'Collaborative Radiant Open Widgets' which is a pure c# widget toolkit with templates and bindings.
Running under Mono, With multi-platform libraries (Cairo, OpenTK) it should run on any target.

The main advantage of this toolkit is it's simplicity and it's coherence. Thanks to the job done by 
OpenTK team on linux drm/kms support, Crow may run without a X server directely in console.

Graphic Rendering stack could easily be changed by implementing ICrowHost, and a custom (and lighter) opengl rendering replacement for cairo is on the stack.

FEATURES
========

- Use OpenTK as top container for device abstraction layer by default, (other container: GTK, GDK)
- Curent drawing routines use Mono.Cairo
- Allow easy creation of XAML like interface under linux directely in console mode, without X
  It only required Mono with cairo libraries, OpenTK, Mesa, GBM and DRM libraries.
- Templated controls, with dynamic binding.
- Inlined delegate in XML

Example
-------

```
<Window Width="800" Height="600" Title="Decks">	
	<HorizontalStack>
		<ListBox Height="0" Width="150" Background="0,5;0,5;0,5;0,5" Name="deckList"
			Data="{DeckList}" HorizontalAlignment="Left" ValueChanged="onDeckListValueChange"
			ItemTemplate="#Magic3D.ui.DeckItemTemplate.goml">
			<Template>
				<Border BorderWidth="1" MinimumSize="0;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}">
					<HorizontalStack Margin="1" Height="{TemplatedHeight}" Width="{TemplatedWidth}">
						<Scroller  Name="scroller1" Height="{TemplatedHeight}" Width="{TemplatedWidth}" 
						 Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
							<VerticalStack Width="{TemplatedWidth}" Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>
						</Scroller>
						<Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
							Orientation="Vertical" Width="10" Height="{TemplatedHeight}" />
					</HorizontalStack>
				</Border>
			</Template>
		</ListBox>
		<HorizontalStack Width="0" Height="0" Background="DimGray" Name="hsDeck"/>
	</HorizontalStack>
</Window>
```
Building
========

#####Build latest OpenTK:
```
git clone https://github.com/opentk/opentk   # Download source code from git
cd opentk                                    # Enter the source directory
msbuild /p:Configuration=Release OpenTK.sln  # Build on .Net (Windows)
xbuild  /p:Configuration=Release OpenTK.sln  # Build on Mono (Linux / Mac OS X)
```
#####Install Cairo and RSVG cli bindings
######On Debian:

```
sudo apt-get install libmono-cairo4.0-cil libglib3.0-cil librsvg2-2.18-cil
```
#####Build Crow
```
git clone https://github.com/jpbruyere/Crow.git   	# Download source code from git
cd Crow	                                    		# Enter the source directory
msbuild /p:Configuration=Release Crow.sln			# Build on .Net (Windows)
xbuild  /p:Configuration=Release Crow.sln			# Build on Mono (Linux / Mac OS X)
```
#####Crow in action

![Crow in action](/magic3d.png?raw=true "Magic3d")

![Crow in action](/screenshot1.png?raw=true "golib")

![Crow in action](/screenshot2.png?raw=true "golib")