/usr/share/doc/python-goocalendar/html/index.html is in python-goocalendar 0.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | <!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>goocalendar — Calendar widget using GooCanvas — GooCalendar 0.3 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">GooCalendar 0.3 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-goocalendar">
<span id="goocalendar-calendar-widget-using-goocanvas"></span><h1><a class="reference internal" href="#module-goocalendar" title="goocalendar: Calendar widget using GooCanvas"><code class="xref py py-mod docutils literal"><span class="pre">goocalendar</span></code></a> — Calendar widget using GooCanvas<a class="headerlink" href="#module-goocalendar" title="Permalink to this headline">¶</a></h1>
<p>The <a class="reference internal" href="#module-goocalendar" title="goocalendar: Calendar widget using GooCanvas"><code class="xref py py-mod docutils literal"><span class="pre">goocalendar</span></code></a> module supplies a calendar widget drawed
with GooCanvas that can display a month view and a week view. It also supplies
classes to manage events you can add to the calendar.</p>
<div class="section" id="calendar-objects">
<span id="calendar"></span><h2>Calendar Objects<a class="headerlink" href="#calendar-objects" title="Permalink to this headline">¶</a></h2>
<p>A <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> is a calendar widget using
GooCanvas that can display a month view and a week view. It holds an
<a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> which contains events
displayed in the calendar.</p>
<dl class="class">
<dt id="goocalendar.goocalendar.Calendar">
<em class="property">class </em><code class="descclassname">goocalendar.</code><code class="descname">Calendar</code><span class="sig-paren">(</span><span class="optional">[</span><em>event_store</em><span class="optional">[</span>, <em>view</em><span class="optional">[</span>, <em>time_format</em><span class="optional">[</span>, <em>firstweekday</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.goocalendar.Calendar" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> object. All arguments are
optional. <em>event_store</em> should be an
<a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a>.
<em>view</em> should be either ‘month’ or ‘week’. Default value is ‘month’.
<em>time_format</em> determines the format of displayed time in the calendar.
Default value is ‘%H:%M’. <em>firstweekday</em> is a constant of module calendar
specifying the first day of the week. Default value is <em>calendar.SUNDAY</em>.</p>
</dd></dl>
<p>Instance attributes:</p>
<dl class="attribute">
<dt id="goocalendar.event_store">
<code class="descclassname">goocalendar.</code><code class="descname">event_store</code><a class="headerlink" href="#goocalendar.event_store" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> currently plugged.
Setting a new event store will automatically redraw the canvas to display
the events of the new event store.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.view">
<code class="descclassname">goocalendar.</code><code class="descname">view</code><a class="headerlink" href="#goocalendar.view" title="Permalink to this definition">¶</a></dt>
<dd><p>The current view: ‘month’ or ‘week’.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.selected_date">
<code class="descclassname">goocalendar.</code><code class="descname">selected_date</code><a class="headerlink" href="#goocalendar.selected_date" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>
which determines the current selected day in the calendar.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.firstweekday">
<code class="descclassname">goocalendar.</code><code class="descname">firstweekday</code><a class="headerlink" href="#goocalendar.firstweekday" title="Permalink to this definition">¶</a></dt>
<dd><p>Determines the first day of the week (0 is Monday).</p>
</dd></dl>
<p>Instance methods:</p>
<dl class="method">
<dt id="goocalendar.select">
<code class="descclassname">goocalendar.</code><code class="descname">select</code><span class="sig-paren">(</span><em>date</em><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.select" title="Permalink to this definition">¶</a></dt>
<dd><p>Select the given date in the calendar. Date should be a
<a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.previous_page">
<code class="descclassname">goocalendar.</code><code class="descname">previous_page</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.previous_page" title="Permalink to this definition">¶</a></dt>
<dd><p>Go to the previous page of the calendar.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.next_page">
<code class="descclassname">goocalendar.</code><code class="descname">next_page</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.next_page" title="Permalink to this definition">¶</a></dt>
<dd><p>Go to the next page of the calendar.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.set_view">
<code class="descclassname">goocalendar.</code><code class="descname">set_view</code><span class="sig-paren">(</span><em>view</em><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.set_view" title="Permalink to this definition">¶</a></dt>
<dd><p>Change calendar’s view. Possible values: ‘month’ or ‘week’.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.draw_events">
<code class="descclassname">goocalendar.</code><code class="descname">draw_events</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.draw_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Redraws events.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.update">
<code class="descclassname">goocalendar.</code><code class="descname">update</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Redraws calendar and events.</p>
</dd></dl>
<p>Instance signals:</p>
<p><code class="docutils literal"><span class="pre">event-pressed</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">event-pressed</span></code> signal is emitted when an Event is pressed with the
button 1 of the mouse.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">event,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>event</em></dt>
<dd>The pressed <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> object.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">event-activated</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">event-activated</span></code> signal is emitted when an
<a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> is double-clicked
with the button 1 of the mouse.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">event,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>event</em></dt>
<dd>The double-clicked <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> object.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">event-released</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">event-released</span></code> signal is emitted when the button 1 of the mouse is
released on an event.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">event,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>event</em></dt>
<dd>The double-clicked <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> object.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">day-pressed</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">day-pressed</span></code> signal is emitted when a day is pressed with the
mouse button 1.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">date,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>date</em></dt>
<dd><a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>
corresponding to the day pressed.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">day-activated</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">day-activated</span></code> signal is emitted when the day is double-clicked with
the mouse button 1.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">date,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>date</em></dt>
<dd><a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>
corresponding to the activated day.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">day-selected</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">day-selected</span></code> signal is emitted when the selected day changes.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">date,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>date</em></dt>
<dd><a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>
corresponding to the new selected day.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">view-changed</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">view-changed</span></code> signal is emitted when the view changes</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">view,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>view</em></dt>
<dd>‘month’ or ‘week’</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">page-changed</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">page-changed</span></code> signal is emitted when the page currently showed in
the calendar is changed.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(calendar,</span> <span class="pre">date,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>calendar</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a> that received the signal.</dd>
<dt><em>date</em></dt>
<dd><a class="reference external" href="http://docs.python.org/library/datetime.html#date-objects">datetime.date</a>
corresponding to the selected day in the calendar.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p>Instance properties:</p>
<p><code class="docutils literal"><span class="pre">text-color</span></code></p>
<blockquote>
<div>The color of the text. Default: #2E3634</div></blockquote>
<p><code class="docutils literal"><span class="pre">inactive-text-color</span></code></p>
<blockquote>
<div>The color of the inactive text. Default: #8B8F8E</div></blockquote>
<p><code class="docutils literal"><span class="pre">border-color</span></code></p>
<blockquote>
<div>The color of border. Default: #D2D0D2</div></blockquote>
<p><code class="docutils literal"><span class="pre">selected-border-color</span></code></p>
<blockquote>
<div>The color of selected border. Default: #5EC590</div></blockquote>
<p><code class="docutils literal"><span class="pre">inactive-border-color</span></code></p>
<blockquote>
<div>The color of inactive border. Default: #E8E7E8</div></blockquote>
<p><code class="docutils literal"><span class="pre">body-color</span></code></p>
<blockquote>
<div>The color of the body. Default: white</div></blockquote>
<p><code class="docutils literal"><span class="pre">today-body-color</span></code></p>
<blockquote>
<div>The color of the today body. Default: ivory</div></blockquote>
<p><code class="docutils literal"><span class="pre">font-desc</span></code></p>
<blockquote>
<div>The attributes specifying which font to use.</div></blockquote>
</div>
<div class="section" id="eventstore-objects">
<span id="eventstore"></span><h2>EventStore Objects<a class="headerlink" href="#eventstore-objects" title="Permalink to this headline">¶</a></h2>
<p>An <a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> is the store of
<a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> that can be plugged to a
<a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a>.</p>
<dl class="class">
<dt id="goocalendar.goocalendar.EventStore">
<em class="property">class </em><code class="descclassname">goocalendar.</code><code class="descname">EventStore</code><a class="headerlink" href="#goocalendar.goocalendar.EventStore" title="Permalink to this definition">¶</a></dt>
<dd><p>There is no arguments for this class.</p>
</dd></dl>
<p>Instance methods:</p>
<dl class="method">
<dt id="goocalendar.add">
<code class="descclassname">goocalendar.</code><code class="descname">add</code><span class="sig-paren">(</span><em>event</em><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Add the given event to the event store.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.remove">
<code class="descclassname">goocalendar.</code><code class="descname">remove</code><span class="sig-paren">(</span><em>event</em><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove the given event from the event store.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.clear">
<code class="descclassname">goocalendar.</code><code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove all events from the event store and restore it to initial state.</p>
</dd></dl>
<dl class="method">
<dt id="goocalendar.get_events">
<code class="descclassname">goocalendar.</code><code class="descname">get_events</code><span class="sig-paren">(</span><em>start</em>, <em>end</em><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.get_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of all events that intersect with the given start and end
datetime. If no start time nor end time are given, the method returns a
list containing all events.</p>
</dd></dl>
<p>Instance signals:</p>
<p><code class="docutils literal"><span class="pre">event-added</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">event-added</span></code> signal is emitted when an Event is added to the
event store.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(event_store,</span> <span class="pre">event,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>event_store</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> that received the signal.</dd>
<dt><em>event</em></dt>
<dd>The added <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a>.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">event-removed</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">event-removed</span></code> signal is emitted when an Event is removed from
the event store.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(event_store,</span> <span class="pre">event,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>event_store</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> that received the signal.</dd>
<dt><em>event</em></dt>
<dd>The removed <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a>.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
<p><code class="docutils literal"><span class="pre">events-cleared</span></code></p>
<blockquote>
<div><p>The <code class="docutils literal"><span class="pre">events-cleared</span></code> signal is emitted when the event store is cleared.</p>
<p><code class="docutils literal"><span class="pre">def</span> <span class="pre">callback(event_store,</span> <span class="pre">user_param1,</span> <span class="pre">...)</span></code></p>
<dl class="docutils">
<dt><em>event_store</em></dt>
<dd>The <a class="reference internal" href="#goocalendar.goocalendar.EventStore" title="goocalendar.goocalendar.EventStore"><code class="xref py py-class docutils literal"><span class="pre">EventStore</span></code></a> that received the signal.</dd>
<dt><em>user_param1</em></dt>
<dd>the first user parameter (if any) specified with the connect() method.</dd>
<dt><em>...</em></dt>
<dd>additional user parameters (if any).</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="event-objects">
<span id="event"></span><h2>Event Objects<a class="headerlink" href="#event-objects" title="Permalink to this headline">¶</a></h2>
<p>An <a class="reference internal" href="#goocalendar.goocalendar.Event" title="goocalendar.goocalendar.Event"><code class="xref py py-class docutils literal"><span class="pre">Event</span></code></a> represents an event in a
<a class="reference internal" href="#goocalendar.goocalendar.Calendar" title="goocalendar.goocalendar.Calendar"><code class="xref py py-class docutils literal"><span class="pre">Calendar</span></code></a>.</p>
<dl class="class">
<dt id="goocalendar.goocalendar.Event">
<em class="property">class </em><code class="descclassname">goocalendar.</code><code class="descname">Event</code><span class="sig-paren">(</span><em>caption</em>, <em>start</em><span class="optional">[</span>, <em>end</em><span class="optional">[</span>, <em>all_day</em><span class="optional">[</span>, <em>text_color</em><span class="optional">[</span>, <em>bg_color</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#goocalendar.goocalendar.Event" title="Permalink to this definition">¶</a></dt>
<dd><p><em>caption</em> argument is mandatory and will be the string displayed on the
event. <em>start</em> argument is mandatory and determines the starting time of
the event. It should be a
<a class="reference external" href="http://docs.python.org/library/datetime.html#datetime-objects">datetime</a>.
All other arguments are optional. <em>end</em> argument may be a datetime,
all_day a boolean value. An event will be considered as all day
event if no <em>end</em> argument is supplied. <em>text_color</em> and <em>bg_color</em>
arguments are supposed to be color strings.</p>
</dd></dl>
<p>Instance attributes:</p>
<dl class="attribute">
<dt id="goocalendar.id">
<code class="descclassname">goocalendar.</code><code class="descname">id</code><a class="headerlink" href="#goocalendar.id" title="Permalink to this definition">¶</a></dt>
<dd><p>Unique identification integer.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.caption">
<code class="descclassname">goocalendar.</code><code class="descname">caption</code><a class="headerlink" href="#goocalendar.caption" title="Permalink to this definition">¶</a></dt>
<dd><p>Caption to display on the event in the calendar.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.start">
<code class="descclassname">goocalendar.</code><code class="descname">start</code><a class="headerlink" href="#goocalendar.start" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference external" href="http://docs.python.org/library/datetime.html#datetime-objects">datetime</a>
determining event start time.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.end">
<code class="descclassname">goocalendar.</code><code class="descname">end</code><a class="headerlink" href="#goocalendar.end" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference external" href="http://docs.python.org/library/datetime.html#datetime-objects">datetime</a>
determining event end time.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.all_day">
<code class="descclassname">goocalendar.</code><code class="descname">all_day</code><a class="headerlink" href="#goocalendar.all_day" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean determining if the day is an all day event or a normal event.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.text_color">
<code class="descclassname">goocalendar.</code><code class="descname">text_color</code><a class="headerlink" href="#goocalendar.text_color" title="Permalink to this definition">¶</a></dt>
<dd><p>String determining caption text color.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.bg_color">
<code class="descclassname">goocalendar.</code><code class="descname">bg_color</code><a class="headerlink" href="#goocalendar.bg_color" title="Permalink to this definition">¶</a></dt>
<dd><p>String determining background color.</p>
</dd></dl>
<dl class="attribute">
<dt id="goocalendar.multidays">
<code class="descclassname">goocalendar.</code><code class="descname">multidays</code><a class="headerlink" href="#goocalendar.multidays" title="Permalink to this definition">¶</a></dt>
<dd><p>Boolean property determining if the event is longer than one day.</p>
</dd></dl>
<p>Supported operations:</p>
<p>All comparisons operations are supported.</p>
<p>event1 is considered less than event2 if it starts before event2.
If two events start at the same time, the event which ends the first
one is considered smaller.</p>
<p>Example usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">datetime</span>
<span class="gp">>>> </span><span class="kn">import</span> <span class="nn">goocalendar</span>
<span class="gp">>>> </span><span class="n">event_store</span> <span class="o">=</span> <span class="n">goocalendar</span><span class="o">.</span><span class="n">EventStore</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">calendar</span> <span class="o">=</span> <span class="n">goocalendar</span><span class="o">.</span><span class="n">Calendar</span><span class="p">(</span><span class="n">event_store</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">event</span> <span class="o">=</span> <span class="n">goocalendar</span><span class="o">.</span><span class="n">Event</span><span class="p">(</span><span class="s1">'Event number 1'</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2012</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">21</span><span class="p">,</span> <span class="mi">14</span><span class="p">),</span>
<span class="gp">... </span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2012</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">21</span><span class="p">,</span> <span class="mi">17</span><span class="p">),</span>
<span class="gp">... </span> <span class="n">bg_color</span><span class="o">=</span><span class="s1">'lightgreen'</span><span class="p">)</span>
<span class="gp">>>> </span><span class="n">event_store</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><code class="docutils literal"><span class="pre">goocalendar</span></code> — Calendar widget using GooCanvas</a><ul>
<li><a class="reference internal" href="#calendar-objects">Calendar Objects</a></li>
<li><a class="reference internal" href="#eventstore-objects">EventStore Objects</a></li>
<li><a class="reference internal" href="#event-objects">Event Objects</a></li>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">GooCalendar 0.3 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2017, Samuel Abels, Cédric Krier, Antoine Smolders.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.6.
</div>
</body>
</html>
|