// PseudoCode:PROPERTY WINDOW
OnOK()
{
	Apply();
	
}


// PseudoCode:PROPERTY WINDOW
OnApply()
{
	Apply();
	
}


// PseudoCode:PROPERTY WINDOW
Apply()
{
	Executing all set functions from classes:
		CStateDesc,
		CTransDesc,
		CSTDDesc,
		CStateList,
		CTransList,
		// *** CheckConsistency? If not, error? ***
	// So that everything that the user have changed from the property window will apply.
	
}



// PseudoCode: State
displaywName()
{
	// gets the label from the selected state;
	// displays it on the name textbox;
	return StateName?
}



// PseudoCode: State
setwName() 
{
	// read string from the textbox;
	// set this string to label of state;
	name = (string from textbox);
}

// PseudoCode: State
displaywColor()
{
	// gets the color from the selected state;
	// displays it on the color listbox;
	return StateColor;
}

// PseudoCode: State
setwColor() 
{
	// read color from the listbox;
	// set this color to color of state;
	StateColor = (string from textbox(RGB));
	
}



// PseudoCode: State
displaywStatus()
{
	bool initial;
	bool final;
	
	switch(get status from the selected state;)
	{
		case 0 = do not check any box of checkbox;
			initial = false;
			final = false;
			break;
		case 1 = check the initial box of status checkbox;
			initial = true;
			final = false;
			break;
		case 2 = check the final box of status checkbox;
			initial = false;
			final = true;
			break;
		case 3 = check both boxes of the checkbox;
 			initial = true;
			final = true;
			break;
	}

	if (initial) { 
		// display checked box 
	}

	else { 
		// display unchecked box 
	}


	if (final) { 
		// display checked box 
	}

	else { 
		// display unchecked box 
	}


}

// PseudoCode: State
setwStatus() // Should checkbox info be passed as a variable?
{
	int status;
	get status from checkbox;
	if (initial)
		status = 1;
	else if (final)
		status = 2;	
	else if (initial&&final)
		status = 3;	
	else
		status = 0;

	// NOTE: Could also be written as:
	int status = 0;
	if (initial) { status += 1; }
	if (final)   { status += 2; }
	// has same effect. But is it unclear?

	set status;	

}


// PseudoCode: State
displaywComment()	// pass state id here? Or is it a function of the state class?
{
	// gets the comment from the selected state;
	// displays it on the comment textbox;

	return StateComment;	// Just return or put GUI info here too?	

}

// PseudoCode: State
setwComment() // Comment passed here?
{
	// read string from the comment textbox;
	// set this string to comment of state;

	set StateComment = comment;

}

// PseudoCode: State
displaywInput()
{
	CArray <int*, int*> tmp= new currentS.getAllInputs();
	for(int i=0; i< tmp.GetSize(); i++)
	{
		add tmp[i].label of transition to list;
	}
	delete tmp;

}

// PseudoCode: State
displaywOutput()
{
	CArray <int*, int*> tmp= new currentS.getAllOutputs();
	for(int i=0; i< tmp.GetSize(); i++)
	{
		add tmp[i].label of transition to list;
	}
	delete tmp;

}

// PseudoCode: StateList
displaywAllStates()
{
	CUpperClass upper;

	CArray <int*, int*> tmp= new upper.getAllStates();
	for(int i=0; i< tmp.GetSize(); i++)
	{
		add tmp[i].label of transition to list;
	}
	delete tmp;
}

// PseudoCode: StateList
showDescription()
{
	CUpperClass upper;
	currentS=upper.getState(upper.getCurrentState());

}


// I'm lazy. Once we figure out what to do for states we can pass
// it down here to. -S


// PseudoCode: Transition
displaywName()
{
	gets the label from the selected transition;
	displays it on the name textbox;
	
}

// PseudoCode: Transition
setwName() 
{
	read string from the textbox;
	set this string to label of transition;
	
}


// PseudoCode: Transition
displaywColor()
{
	gets the color from the selected transition;
	displays it on the color listbox;
}

// PseudoCode: Transition
setwColor() 
{
	read color from the listbox;
	set this color to color of transition;
	
}

// PseudoCode: Transition
displaywComment()
{
	gets the comment from the selected transition;
	displays it on the comment textbox;

}

// PseudoCode: Transition
setwComment()
{
	read string from the comment textbox;
	set this string to comment of transition;

}

// PseudoCode: Transition
displaywType()
{

	Transition tmpT;
	CArray
	This function gets the transition type of the selected transition and displays it on the type combobox.

}



















