/******************************************************************************
 GNBToDoNode.h

	Interface for GNBToDoNode class.

	Copyright © 1998 by Glenn W. Bach. All rights reserved.

 ******************************************************************************/

#ifndef _H_GNBToDoNode
#define _H_GNBToDoNode

#include "GNBBaseNode.h"
#include <JFileArray.h>
#include <JFontStyle.h>

class JString;
class ostream;
class JTree;

class GNBToDoNode : public GNBBaseNode
{
public:

	GNBToDoNode(JNamedTreeNode* parent,
						const char* name);

	GNBToDoNode(JTree* tree,
						const char* name);

	virtual ~GNBToDoNode();

	virtual void		SaveNode(ostream& os);
	virtual void		ReadNodeSetup(istream& is, const JFileVersion version);

	JBoolean			IsDone() const;
	void				ToggleDone();

	JFontStyle			GetFontStyle();

	virtual void		DiscardNode();
	JBoolean			GetID(JFAID_t* id);

	JBoolean			HasNote() const;
	void				AddNote();
	void				RemoveNote();

	JBoolean			IsUrgent() const;
	void				ToggleUrgency();

private:

	JBoolean 			itsIsDone;
	JBoolean			itsHasNote;
	JFAID_t				itsFileID;
	JBoolean			itsIsUrgent;
	
private:

	// not allowed

	GNBToDoNode(const GNBToDoNode& source);
	const GNBToDoNode& operator=(const GNBToDoNode& source);

};

/******************************************************************************
 IsDone (public)

 ******************************************************************************/

inline JBoolean
GNBToDoNode::IsDone()
	const
{
	return itsIsDone;
}

/******************************************************************************
 HasNote (public)

 ******************************************************************************/

inline JBoolean
GNBToDoNode::HasNote()
	const
{
	return itsHasNote;
}

/******************************************************************************
 IsUrgent (public)

 ******************************************************************************/

inline JBoolean
GNBToDoNode::IsUrgent()
	const
{
	return itsIsUrgent;
}

#endif
