BCGSuite for MFC
CBCGPPlannerManagerCtrl

Detailed Description

The CBCGPPlannerManagerCtrl (Planner Control) class implements the functionality of a tool that allows to create appointments (events) and manage them.

An appointment is an entity, which has two main properties - start time and finish time. Appointments can be persisted in an external storage. The Planner Control has four view types. Each view represents the existing appointments differently.

The base class for all views is CBCGPPlannerView (do not confuse the name "view" with MFC's CView).

The printing support is provided by the CBCGPPlannerPrint class and by four derived classes, which implement print support for specific views.

The CBCGPPlannerManagerView class allows easy integration with MFC's document/view architecture. This class is derived from CView, so you can just plug it into a document template.

If you're not using CBCGPPlannerManagerView class, then you create the Planner Control in two steps. First, construct the object, second, call CBCGPPlannerManagerCtrl::Create and the Planner Control is ready to use.

The following code illustrates how to use the Planner Control in application:

Copy
// Add AfxOleInit () to the application's InitInstance
// Create planner control:
m_wndCalendar.Create(WS_CHILD | WS_VISIBLE, rectCalendar, this, IDC_CALENDAR);
// Create a new appointment: today, 9:30AM - 10:30AM, name "Meeting":
COleDateTime now = COleDateTime::GetCurrentTime();
COleDateTime(now.GetYear(), now.GetMonth(), now.GetDay(), 9, 30, 0),
COleDateTime(now.GetYear(), now.GetMonth(), now.GetDay(), 10, 30, 0),
_T("Meeting"));
// Add this appointment to planner:
m_wndCalendar.AddAppointment(pApp);
See also
CBCGPPlannerView, CBCGPPlannerPrint, CBCGPAppointment, CBCGPAppointmentBaseStorage

Inherits CBCGPWnd.

Public Types

enum  BCGP_PLANNER_TYPE
 

Public Member Functions

 CBCGPPlannerManagerCtrlConstructs a Planner Control object.
 
 AddAppointmentAdds appointment to a storage.
 
 AddResourceAdds new storage to the multi resource Planner control.
 
 AddResourceRTCAdds new storage runtime class to the multi resource Planner control.
 
 AdjustLayoutAdjusts layout and repositions appointments in the current view.
 
 ClearAppointmentSelectionClears selection for all appointments.
 
 CreateCreates and initializes the Windows control and attaches the control handle to CBCGPPlannerManagerCtrl object.
 
 DrawClockIconDraws a clock icon.
 
 EditCopyCopies selected appointments to the system Clipboard.
 
 EditCutCopies the selected appointments to the Clipboard and removes them from the storage.
 
 EditPastePastes appointments from the Clipboard to the Planner Control.
 
 EnableAutoHideScrollBarsScpecifies whether control's scroll bars should be hidden when scroll bars are inactive (mouse cursor is located outside of scrollbar).
 
 EnableDragScrollSpecifies whether vertical scrolling during appointment dragging and time range selection should be enabled.
 
 GetAppointmentFromPointReturns a pointer to an appointment whose bounding rectangle contains the specified point.
 
 GetBackgroundColorReturns the current background color.
 
 GetCalendarReturns the related calendar control.
 
 GetClockIconSizeReturns the size of clock icons.
 
 GetCurrentResourceIDReturns ID of a Resource currently selected in the multi resource view.
 
 GetDateReturns the current (selected) date of the current view (view can be daily, work week, weekly, monthly).
 
 GetDateEndReturns end date of the current view.
 
 GetDateFromPointReturns the nearest date to the point.
 
 GetDateStartReturns the start date of the current view.
 
 GetFirstSelectedAppointmentReturns position of first selected appointment.
 
 GetFirstWorkingHourReturns the value of first working hour.
 
 GetLastSelectedAppointmentReturns position of last selected appointment.
 
 GetLastWorkingHourReturns the last working hour.
 
 GetNextSelectedAppointmentReturns the next selected appointment.
 
 GetPrevSelectedAppointmentReturns the previous selected appointment.
 
 GetResourceInfoReturns information about the specified Resource.
 
 GetScrollBarsStyleReturns the current scroll bar style.
 
 GetSelectedAppointmentsCountReturns the number of selected appointments.
 
 GetStorageReturns a pointer to the storage object.
 
 GetTypeReturns type of the current view.
 
 GetViewDurationReturns duration, in days, of the current view.
 
 IsAppointmentInSelectionTells whether an appointment is selected.
 
 IsCompressWeekendTells whether the Planner Control displays weekends in the monthly view in one, or two columns.
 
 IsDateInSelectionTells whether a date/time is located inside selection range (selection interval) of the current view.
 
 IsDragScrollEnabledTells whether vertical scrolling during appointment dragging and time range selection is enabled.
 
 IsDrawTimeAsIconsTells whether appointment time is displayed as text, or as icons.
 
 IsDrawTimeFinishTells whether the Planner Control displays end time for appointments.
 
 IsEditCopyEnabledTells whether the selected appointments can be copied to the system Clipboard.
 
 IsEditCutEnabledTells whether selected appointments can be copied to the Clipboard and removed from the storage.
 
 IsEditPasteEnabledTells whether appointments are present in the Clipboard and can be pasted to the Planner Control.
 
 IsMultiDayLessThan24Tells whether the Planner Control displays multi-days appointments with duration less than 24 hours - in one or two bars.
 
 IsMultiResourceStorageTells whether the Planner control works with multi resource storage, or not.
 
 IsNotifyParentIf this method returns TRUE, BCGP_PLANNER_ADD_APPOINTMENT message is sent to the parent of the Planner Control .
 
 IsReadOnlyTells whether - the planner control is read-only, or not.
 
 IsScrollBarAutoHideEnabledTells whether control's scroll bars are auto-hidden.
 
 IsShowToolTipTells whether tooltips are enabled or not.
 
 OnBeginPrintingCalled by the framework when the printing is about to start.
 
 OnEndPrintingCalled by the framework when the print job or print preview has been completed.
 
 OnPrintCalled by the framework to print or preview a page of the Planner.
 
 PrintPrints without support of Document/View architecture.
 
 QueryAppointmentsLoads appointments from the storage to the Planner Control.
 
 QueryAppointmentsLoads appointments from the storage to the Planner Control.
 
 RemoveAllAppointmentsRemoves all appointments from the storage.
 
 RemoveAppointmentRemoves an appointment from the storage.
 
 RemoveResourceRemoves the specifies Resource and its associated storage from the multi resource planner control.
 
 RemoveSelectedAppointmentsRemoves all selected appointments from the storage.
 
 SelectAppointmentSelects or unselects the specified appointment.
 
 SerializeRawSerializes all appointments.
 
 SetBackgroundColorSets the new background color for the Planner control.
 
 SetCalendarSets related Calendar control
 
 SetClockIconsRTCProvides the Planner Control with runtime class information of a custom class that should manage the clock icons.
 
 SetCompressWeekendSets the Planner Control how to display weekends in the monthly view - in one or two columns.
 
 SetCurrentResourceIDSelects the specified Resource is the multi resource view.
 
 SetDateSets the current date of the current view.
 
 SetDateIntervalTells the Planner control to display the required period.
 
 SetDrawTimeAsIconsSets a flag that tells the Planner Control how to display appointment time, either as text, or as clock icons.
 
 SetDrawTimeFinishSets the property, which tells the Planner Control whether to display end time for appointments.
 
 SetFirstDayOfWeekSets the first day of week.
 
 SetFirstWeekOfYearSets first week of year.
 
 SetMultiDayLessThan24Sets the Planner Control how to display multi-days appointments with duration less than 24 hours - in one or two bars.
 
 SetNotifyParentSpecifies whether the parent of the Planner Control should be notified.
 
 SetReadOnlySets or clears the read-only flag.
 
 SetScrollBarsStyleTells the Planner Control to use either Windows standard, or owner draw scroll bar
 
 SetShowToolTipTurns tooltips on or off.
 
 SetStorageRTCProvides the Planner Control with runtime class information of a custom storage class.
 
 SetTodaySets the current date of the current view to current system date.
 
 SetTypeSets the current view type
 
 SetUseMultiResourceDefaultTells the Planner control to use multi resource storage by the default.
 
 SetWorkingHourIntervalSets the first and the last working hours.
 
 UpdateAppointmentUpdates an appointment in the storage.
 
 UpdateCalendarsSelectionUpdates selection state of the specified calendar (date picker) control.
 
 UpdateCalendarsStateUpdates state of a calendar (date picker) control.
 

Static Public Member Functions

 CreateRuleCreates a rule by the given ID.
 
 DrawImageIconDraws an image icon at the specified location.
 
 GetFirstDayOfWeekReturns the number of first day of week.
 
 GetFirstWeekOfYearGets the first week of year.
 
 GetImageListReturns global image list for appointment images.
 
 GetImageSizeReturns size of appointment images.
 
 GetRulesIDReturns array of registered rule identifiers.
 
 GetSystemFirstDayOfWeekReturns the number of first day of week from the system.
 
 GetSystemFirstWeekOfYearGets the first week of year from the system.
 
 RegisterRuleRegisters a recurrence rule
 
 SetImagesLoads appointment images from application resources.
 
 SetImagesLoads appointment images from application resources.