#ifndef wn_matrix_INCLUDED
	#define wn_matrix_INCLUDED

#include <bncs_script_helper.h>

#ifdef WIN32
	#ifdef DOEXPORT_SCRIPT
		#define EXPORT_SCRIPT __declspec(dllexport) 
	#else
		#define EXPORT_SCRIPT 
	#endif
#else 
	#define EXPORT_SCRIPT
#endif
 
class wn_matrix : public bncs_script_helper
{
public:
	wn_matrix( bncs_client_callback * parent, const char* path );
	virtual ~wn_matrix();

	void buttonCallback( buttonNotify *b );
	int revertiveCallback( revertiveNotify * r );
	void databaseCallback( revertiveNotify * r );
	bncs_string parentCallback( parentNotify *p );
	void timerCallback( int );
	
private:
	bncs_string m_instance;				// Router Instance name

	bncs_string m_pageoffset;			// Added to page number. Default ot 0 for sources.
	bncs_string m_mapdb;				// Database to use for mapping of buttons.Default is 8
	bncs_string m_mapoffset;			// Offset to add to the page number for button mapping
	bncs_string m_groupmapoffset;		// Offset to add to the group page number for button mapping
	bncs_string m_namesdb;				// Database used to get names.Default is 0 (sources)
	
	bncs_string panel_name;				// Holds the name of the bncs_ui file for the current size
	bncs_string host_size;				// Holds the target (host) panel size. Selects which bncs_ui is invoked.
	bncs_string grp_selected_state;		// The statesheet name used for the group buttons, selected group.
	bncs_string grp_deselected_state;	// The statesheet name used for the group buttons, unselected state.
	bncs_string item_selected_state;	// The statesheet name used for the selected item button.
	bncs_string item_deselected_state;	// The statesheet name used for the deselected item buttons.
	bncs_string background_colour;		// The statesheet used to set the colour of the background panel.

	int myIndex;						// Index of the currently selected button. -1 indicates no selection
	int group_page;						// Page number of the current group. Range 1 to 12 for valid selections
	bool panel_displayed;
	
};


#endif // wnsourcematrix_INCLUDED