Module calendarcontrol :: Class Calendar
[hide private]
[frames] | no frames]

Class Calendar

source code

     object --+                
              |                
wx._core.Object --+            
                  |            
wx._core.EvtHandler --+        
                      |        
        wx._core.Window --+    
                          |    
          wx._windows.Panel --+
                              |
       widgets.BitPimWidget --+
                              |
                             Calendar
Known Subclasses:

The main calendar control.

You should subclass this clas and need to implement the following methods:

OnGetEntries OnEdit

The following methods you may want to call at some point:

RefreshEntry RefreshAllEntries

Instance Methods [hide private]
 
_initvars(self) source code
EvtHandler
__init__(self, parent, rows=5, id=-1)
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, ...
source code
 
OnKeyDown(self, event) source code
 
OnMouseWheel(self, event) source code
 
OnLeftDown(self, event) source code
 
OnLeftDClick(self, event) source code
 
OnYearButton(self, event) source code
 
OnTodayButton(self, _) source code
 
makerow(self, sizer, row) source code
 
scrollby(self, amount) source code
 
ensureallpainted(self) source code
 
OnScrollDown(self, _=None) source code
 
OnScrollUp(self, _=None) source code
 
setday(self, year, month, day) source code
 
showday(self, year, month, day, rowtoshow=-1)
Ensures specified date is onscreen
source code
Bool
isvisible(self, year, month, day)
Tests if the date is visible to the user
source code
 
RefreshEntry(self, year, month, day)
Causes that date's entries to be refreshed.
source code
 
RefreshAllEntries(self)
Call this if you have completely changed all your data.
source code
 
setselection(self, year, month, day)
Selects the specifed date if it is visible
source code
 
_unselect(self) source code
 
updatecell(self, row, column, y=-1, m=-1, d=-1) source code
 
updaterow(self, row, y, m, d) source code
 
OnGetEntries(self, year, month, day)
Return a list of entries for the specified y,m,d.
source code
 
OnEdit(self, year, month, day)
The user wishes to edit the entries for the specified date
source code

Inherited from wx._windows.Panel: Create, SetFocusIgnoringChildren, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, OnPaint, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Inherited from widgets.BitPimWidget: ActivateSelf, AddNode, AddSubPage, CanAdd, CanCopy, CanDelete, CanPaste, CanPrint, CanRename, CanSelectAll, GetAddInfo, GetDeleteInfo, GetHelpID, GetRightClickMenuItems, GetWidgetName, HasColumnSelector, HasHistoricalData, HasPreviewPane, InitialiseWidget, IsPreviewPaneEnabled, OnAdd, OnCopy, OnDelete, OnHistoricalData, OnInit, OnKeyUp, OnPaste, OnPopupMenu, OnPostActivate, OnPreActivate, OnPrintDialog, OnRename, OnRightClickMenuExit, OnSelectAll, OnSelected, OnViewColumnSelector, OnViewPreview

Static Methods [hide private]

Inherited from wx._windows.Panel: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Class Variables [hide private]
  ID_UP = 242
  ID_DOWN = 243
  ID_YEARBUTTON = 244
  ID_TODAYBUTTON = 245
  attrevenmonth = None
  attroddmonth = None
  attrselectedcell = None

Inherited from widgets.BitPimWidget: MENU_CHECK, MENU_NORMAL, MENU_SPACER

Properties [hide private]

Inherited from wx._windows.Panel: thisown

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, rows=5, id=-1)
(Constructor)

source code 

__init__(self, Window parent, int id=-1, Point pos=DefaultPosition, 
    Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, 
    String name=PanelNameStr) -> Panel

Returns: EvtHandler
Overrides: widgets.BitPimWidget.__init__

OnKeyDown(self, event)

source code 
Overrides: widgets.BitPimWidget.OnKeyDown

showday(self, year, month, day, rowtoshow=-1)

source code 

Ensures specified date is onscreen

Parameters:
  • rowtoshow - if is >=0 then it will be forced to appear in that row

RefreshEntry(self, year, month, day)

source code 

Causes that date's entries to be refreshed.

Call this if you have changed the data for one day. Note that your OnGetEntries will only be called if the date is currently visible.

RefreshAllEntries(self)

source code 

Call this if you have completely changed all your data.

OnGetEntries will be called for each visible day.

OnGetEntries(self, year, month, day)

source code 

Return a list of entries for the specified y,m,d.

You must implement this method in a derived class

The format is ( (hour,min,desc), (hour,min,desc)... ) Hour should be in 24 hour format. You should sort the entries.

Note that Calendar does not cache any results so you will be asked for the same dates as the user scrolls around.

OnEdit(self, year, month, day)

source code 

The user wishes to edit the entries for the specified date

You should implement this method in a derived class