npCard plugin

About this plugin

This plugin allow you to use fully customizable cards (calendars) controls in your publications. Set the colors, fonts and other Card objects options. Use the available events and control the Card objects using the provided plugin actions.

The Cards objects show only the calendar part, so you can use your own buttons or whatever you want in order to control de Cards objects. Also is possible to move the calendar date using the keyboard arrow keys and CTRL and SHIFT modifiers.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npCardCreate

Create a new instance of a Card object and attach it to a NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardDestroy

Destroy a previously Card object instance and deattach from their NeoBook rectangle. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardDestroyAll

Destroy all previously Card objects instances and deattach from their NeoBook rectangles.

↑↑

npCardPrev

Backward the number of a specific data on a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardNext

Forward the number of a specific data on a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardToday

Show the current date on a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardGetDate

Get the date of a Card object instance. The year, month and day are stored on the provided variables. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardSetDate

Set the date of a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardAddNoted

Add a new noted day to a Card object. With this action you can specify an "special" day to be "noted" on a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardDeleteNoted

Delete a previously added noted day from the Card object. You can add noted days with npCardAddNoted. If you want to clear all noted days can use npCardClearNoted. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardClearNoted

Clear the noted days previously added (using the npCardAddNoted action) to a Card object instance. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardIsNoted

Find if the specified date is noted in a Card object. The result variable store "True" if everything is the date has previosly noted, or "False" when not. The result variable also can store "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardFonts

Specify various fonts of a Card object instance. The fonts must be on "NeoBook format". Use the action properties form to set or to take a look at the string that represent a valid font to be set. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardColors

Specify the colors of a Card object instance. The colors must to be on "NeoBook format". The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npCardOptions

Specify general options of a Card object instance. Here are the available Cards objects options:

The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npOnCardClick

Set a subroutine to be executed when a Card object instance are clicked. The rectangle variable store the name of rectangle object that fire the event. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

npOnCardDblClick

Set a publication subroutine to be executed when the Card double click event is fired. The rectangle variable store the rectangle in which the double click has made. The result variable store "True" if everything is OK, or "False" if an error occur. In this case the [LastError] store the error information.

↑↑

npOnCardMouseDown

Set a publication subroutine to be executed when the Card mouse down event is fired. The rectangle variable store the rectangle in which the mouse down has made. The button variable can contain one the values: mbLeft, mbMiddle or mbRight. The X variable store the mouse X position, and the Y variable the Y mouse position. The result variable store "True" if everything is OK, or "False" if an error occur. In this case the [LastError] store the error information.

↑↑

npOnCardMouseUp

Set a publication subroutine to be executed when the Card mouse up event is fired. The rectangle variable store the rectangle in which the mouse up has made. The button variable can contain one the values: mbLeft, mbMiddle or mbRight. The X variable store the mouse X position, and the Y variable the Y mouse position. The result variable store "True" if everything is OK, or "False" if an error occur. In this case the [LastError] store the error information.

↑↑

npOnCardChange

Set a subroutine to be executed when the date change on a Card object instance. The rectangle variable store the name of rectangle object that fire the event. The result variable store "True" if everything is OK, or "False" if an error occur. In this last case the [LastError] variable contain information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑