PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBDateCtl
Wrapper Class for the IDateCtl interface.
#include <SFBDateCtl.h.hpp>
class SFBDateCtl : public SFBControl;
SFMTYPEDEFWRAPPER(SFBDateCtl)

Inheritance diagram

 Inheritance diagram of SFBDateCtlClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
O O O O

Reference

BREW API IDateCtl

Member

Public Functions
Void EnableCommand( Bool enable , UInt16 id )
Enable the date control object to send a user-defined command to the active applet.
Bool GetDate( SInt32Ptr year , SInt32Ptr month , SInt32Ptr day )
Get the date from the date control object.
Bool GetDateString( WCharPtr buffer , SInt32 buffSize , SInt32Ptr countChars , UInt32 dateFormat )
Get the date string in the specified format.
Bool GetDateString( SFXWideStringPtr string , UInt32 dateFormat )
Get the date string in the specified format.
UInt16 GetDayOfWeek( Void )
Get the day of week from the date control object.
WCharPtr GetDayString( WCharPtr buffer , SInt32 buffSize , SInt32Ptr countChars )
Get the name of the day corresponding to the date control object’s current date.
Bool GetDayString( SFXWideStringPtr string )
Get the name of the day corresponding to the date control object’s current date.
Bool GetFont( AEEFont* text , AEEFont* title )
This method allows the caller to get the title and text fonts.
SInt32 GetJulianDay( Void )
Get the Julian day value of the specified date control object.
WCharPtr GetMonthString( WCharPtr buffer , SInt32 buffSize , SInt32Ptr countChars )
Get the name of the month of the date control object’s current date.
Bool GetMonthString( SFXWideStringPtr string )
Get the name of the month of the date control object’s current date.
static
SFBDateCtlSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBDateCtl instance.
static
SFBDateCtlSmp
NewInstance( AEECLSID clsid , SFCErrorPtr exception = null )
Create a new SFBDateCtl instance.
Void SetActiveDayMask( UInt32 mask )
Set a new active day mask.
Bool SetDate( SInt32 year , SInt32 month , SInt32 day )
Assign the specified date to the date control object.
Void SetFont( AEEFont text , AEEFont title )
Set the title and text fonts.
Bool SetJulianDay( SInt32 day )
Assign the specified Julian day to the date control object.
Bool SetTitle( ACharConstPtr resourceFile , UInt16 resourceId )
Set title of a date control object.
Bool SetTitle( WCharPtr text )
Set title of a date control object.
Bool SetTitle( SFXAnsiStringConstRef resourceFile , UInt16 resourceId )
Set title of a date control object.
Bool SetTitle( SFXWideStringConstRef text )
Set title of a date control object.
Void SizeToFit( SFXRectanglePtr rect )
This method allows the caller to size the rectangle to the date text.
UInt32 GetProperties( Void ) (inherits from SFBControl)
Return the control-specific properties or flags.
Void GetRect( SFXRectanglePtr rect ) (inherits from SFBControl)
Get the rectangle of the control.
SFXRectangle GetRect( Void ) (inherits from SFBControl)
Get the rectangle of the control.
Bool HandleEvent( AEEEvent event , UInt16 wParam , UInt32 dwParam ) (inherits from SFBControl)
Pass events to a control. The BREW controls process various events to allow a device user to enter a text, time, or date value or choose an item from a menu. Refer to the descriptions of each control for the events it handles. Your applet must pass a control all of the events, unless the control is part of a dialog. Below is an example of an application passing all of the events to the controls of the application.
Bool HandleEvent( SFXEventConstRef event ) (inherits from SFBControl)
Pass events to a control. The BREW controls process various events to allow a device user to enter a text, time, or date value or choose an item from a menu. Refer to the descriptions of each control for the events it handles. Your applet must pass a control all of the events, unless the control is part of a dialog. Below is an example of an application passing all of the events to the controls of the application.
Bool IsActive( Void ) (inherits from SFBControl)
Return the active or focus state of the control.
Bool Redraw( Void ) (inherits from SFBControl)
Instruct the control to redraw its contents.
Void Reset( Void ) (inherits from SFBControl)
Instruct the control to reset (free/delete) its contents and to immediately leave active/focus mode.
Void SetActive( Bool active = true ) (inherits from SFBControl)
Instruct the control to enter/leave focus or selected mode.
Void SetProperties( UInt32 properties ) (inherits from SFBControl)
Set control-specific properties or flags.
Void SetRect( SFXRectangleConstRef rect ) (inherits from SFBControl)
Set the active screen coordinates of the control. This may result in the control redrawing its contents.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBDateCtl::EnableCommand
Enable the date control object to send a user-defined command to the active applet.
[ public ]
Void EnableCommand(
    Bool enable   // boolean value for enable flag
    UInt16 id     // command ID
);

Reference

BREW API IDATECTL_EnableCommand


SFBDateCtl::GetDate
Get the date from the date control object.
[ public ]
Bool GetDate(
    SInt32Ptr year    
    SInt32Ptr month   
    SInt32Ptr day     
);

Reference

BREW API IDATECTL_GetDate | SFBDateCtl::SetDate


SFBDateCtl::GetDateString
Get the date string in the specified format.
[ public ]
Bool GetDateString(
    WCharPtr buffer        // placeholder for date string
    SInt32 buffSize        // size of the input buffer (pBuffer) in bytes 
    SInt32Ptr countChars   // placeholder for the number of characters written in buffer
    UInt32 dateFormat      // format of the date string. 
                           // use one of the date string formats given: 
                           // DFMT_DD_MONTH_YYYY  : 18 July 2000
                           // DFMT_DD_MON_YYYY    : 18 Jul 2000
                           // DFMT_DD_MON_YY      : 18 Jul ‘00
                           // DFMT_MONTH_DD_YYYY  : July 18, 2000
                           // DFMT_MON_DD_YYYY    : Jul. 18, 2000
                           // DFMT_MON_DD_YY      : Jul 18, ‘00
                           // DFMT_MM_DD_YYYY     : 10/15/2000
                           // DFMT_DD_MM_YYYY     : 15/10/2001
                           // DFMT_YYYY_MM_DD     : 2001/6/1
                           // DFMT_INT_YYYY_MM_DD : 2001.06.01
);
[ public ]
Bool GetDateString(
    SFXWideStringPtr string   
    UInt32 dateFormat         
);

Reference

BREW API IDATECTL_GetDateString | SFBDateCtl::GetDayString | SFBDateCtl::GetMonthString


SFBDateCtl::GetDayOfWeek
Get the day of week from the date control object.
[ public ]
UInt16 GetDayOfWeek(Void);

Reference

BREW API IDATECTL_GetDayOfWeek


SFBDateCtl::GetDayString
Get the name of the day corresponding to the date control object’s current date.
[ public ]
WCharPtr GetDayString(
    WCharPtr buffer        // placeholder for day name
    SInt32 buffSize        // size of the input buffer in bytes
    SInt32Ptr countChars   // placeholder for number of characters written in buffer
);
[ public ]
Bool GetDayString(
    SFXWideStringPtr string   // placeholder for day name
);

Reference

BREW API IDATECTL_GetDayString | SFBDateCtl::GetMonthString | SFBDateCtl::GetDateString


SFBDateCtl::GetFont
This method allows the caller to get the title and text fonts.
[ public ]
Bool GetFont(
    AEEFont* text    // pointer to location to set to text font 
    AEEFont* title   // pointer to location to set to title font 
);

Reference

BREW API IDATECTL_GetFont | SFBDateCtl::SetFont


SFBDateCtl::GetJulianDay
Get the Julian day value of the specified date control object.
[ public ]
SInt32 GetJulianDay(Void);

Reference

BREW API IDATECTL_GetJulianDay | SFBDateCtl::SetJulianDay


SFBDateCtl::GetMonthString
Get the name of the month of the date control object’s current date.
[ public ]
WCharPtr GetMonthString(
    WCharPtr buffer        // placeholder for month name
    SInt32 buffSize        // size of the input buffer in bytes
    SInt32Ptr countChars   // placeholder for number of characters written in buffer
);
[ public ]
Bool GetMonthString(
    SFXWideStringPtr string   // placeholder for month name
);

Reference

BREW API IDATECTL_GetMonthString | SFBDateCtl::GetDayString | SFBDateCtl::GetDateString


SFBDateCtl::NewInstance
Create a new SFBDateCtl instance.
[ public, static ]
SFBDateCtlSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBDateCtlSmp NewInstance(
    AEECLSID clsid                 // ClassID for the SFBDateCtl class
    SFCErrorPtr exception = null   // Error
);

SFBDateCtl::SetActiveDayMask
Set a new active day mask.
[ public ]
Void SetActiveDayMask(
    UInt32 mask   
);

Reference

BREW API IDATECTL_SetActiveDayMask


SFBDateCtl::SetDate
Assign the specified date to the date control object.
[ public ]
Bool SetDate(
    SInt32 year    
    SInt32 month   
    SInt32 day     
);

Reference

BREW API IDATECTL_SetDate | SFBDateCtl::GetDate


SFBDateCtl::SetFont
Set the title and text fonts.
[ public ]
Void SetFont(
    AEEFont text    // font to use for the text (if 0, normal font is used)
    AEEFont title   // font to use for the title (if 0, bold font is used)
);

Reference

BREW API IDATECTL_SetFont | SFBDateCtl::GetFont


SFBDateCtl::SetJulianDay
Assign the specified Julian day to the date control object.
[ public ]
Bool SetJulianDay(
    SInt32 day   // julian day to be assigned
);

Reference

BREW API IDATECTL_SetJulianDay | SFBDateCtl::GetJulianDay


SFBDateCtl::SetTitle
Set title of a date control object.
[ public ]
Bool SetTitle(
    ACharConstPtr resourceFile   // null-terminated string containing resource file name
    UInt16 resourceId            // string resource identifier
);
[ public ]
Bool SetTitle(
    WCharPtr text   // null-terminated title string
);
[ public ]
Bool SetTitle(
    SFXAnsiStringConstRef resourceFile   // null-terminated string containing resource file name
    UInt16 resourceId                    // string resource identifier
);
[ public ]
Bool SetTitle(
    SFXWideStringConstRef text   // null-terminated title string
);

Reference

BREW API IDATECTL_SetTitle


SFBDateCtl::SizeToFit
This method allows the caller to size the rectangle to the date text.
[ public ]
Void SizeToFit(
    SFXRectanglePtr rect   // pointer to location to set to bounding rectangle
);

Reference

BREW API IDATECTL_SizeToFit | AEERect