forked from xrg/SpiffGtkWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
47 lines (30 loc) · 1.07 KB
/
Copy pathREADME
File metadata and controls
47 lines (30 loc) · 1.07 KB
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
= Spiff GtkWidgets =
This library is part of the Spiff platform.
Spiff Gtk Widgets contains a number of Gtk widgets
by other Spiff components:
* A calendar similar to Google's online calendar.
* A text view that supports advanced features like undo/redo, annotations,
auto-indenting bullet point lists, etc.
= Dependencies =
* pygtk 2.4 or greater
* python-hippocanvas
= Usage =
Examples can be found in the tests/SpiffGtkWidgets/ directory of this project.
= Calendar Usage =
#Text
import datetime
from SpiffGtkWidgets.Calendar import Calendar, Model, Event
model = Model()
calendar = Calendar(model)
def on_event_clicked(calendar, event):
print "Event %s was clicked" % event.caption
def on_day_selected(calendar, day, event):
print "Day %s was clicked" % day
event = Event('Event number 1',
datetime.datetime(2007, 10, 8, 02),
datetime.datetime(2007, 10, 8, 17),
bg_color = 'lightgreen')
model.add_event(event)
calendar.connect('event-clicked', on_event_clicked)
calendar.connect('day-selected', on_day_selected)
#End