// NNTP GUI definition
//
// ServerAddress			Address of target server
// Name						Name of client. Works only with fFrame
// Target					Target of the messages to send
// Source					Source for the received messages
//
// GroupsGauge				% of how many groups are already scanned this session
// MessagesGauge			% of how many messages are already sent/received this session
// LinesGauge				% of how many lines are already sent this message
//
// Action					What the client currently does
// State					Last state from server
//
// CurrentGroup				Group that is currently fetched
//
// GroupsToReceive			Groups that have to be scanned this session
// GroupsReceived			Groups that have been scanned session
//
// MessagesToProcess		Messages that have to be send/received
// MessagesProcessed		Messages that have been sent/received
//
// TotalMessagesSent		Messages that have been sent since nntp is running
// TotalMessagesReceived	Messages that have been sent since nntp is running
//
// LinesSent				Lines sent of the current message
// LinesToSend				Lines to send of the current message
// BytesReceived			Bytes received of the current message


// This is the window as a framework around the main group
#define "Main" Window
{
	Title "NNTP",
	MoveTo 200 320,
	Child VerticalGroup
	{
		// This one is the main group
		Name "MainGroup"
	}
}

// This one represents one NNTPClient
#define "NNTPClient" Frame
{
	Name Name,
	Text "Client",
	Child VerticalGroup
	{
		Child HorizontalGroup
		{
			Child Label( Text "Address:", HorizontalWeight 0),
			Child Label( Name ServerAddress, Text ""),
			Child Label( Text "Account:", HorizontalWeight 0),
			Child Label( Name Account, Text ""),
			Child Label( Text "Target:", HorizontalWeight 0),
			Child Label( Name Target, Text "", HorizontalWeight 0),
			Child Label( Text "Source:", HorizontalWeight 0),
			Child Label( Name Source, Text "", HorizontalWeight 0)
		},
		Child HorizontalGroup
		{
			Child Label( Text "Total sent:", HorizontalWeight 0),
			Child Label( Name TotalMessagesSent, Text "         0", HorizontalWeight 0),
			Child Label( Text "Total received:", HorizontalWeight 0),
			Child Label( Name TotalMessagesReceived, Text "         0", HorizontalWeight 0)
		},
		Child HorizontalGroup
		{
			Child Label( Text "Last state:", HorizontalWeight 0),
			Child Label( Name State, Text "")
		},
		Child HorizontalGroup
		{
			Child Label( Text "Action:", HorizontalWeight 0),
			Child Label( Name Action, Text "Waiting...", HorizontalWeight 0),
		},
		Child HorizontalGroup
		{
			Child Label( Text "Group:", HorizontalWeight 0),
			Child Label( Name CurrentGroup, Text "", HorizontalWeight 0),
			Child Label( Text "Message:", HorizontalWeight 0),
			Child Label( Name CurrentMessage, Text "0", MinimumWidthText "00000", HorizontalWeight 0),
			Child Label( Text "Bytes:", HorizontalWeight 0),
			Child Label( Name BytesReceived, Text "0", MinimumWidthText "00000", HorizontalWeight 0)
		},
		Child MultiColumnGroup
		{
//			Weights 0,
			Columns 5,
			ColumnWeight 0 0,
			ColumnWeight 2 0,
			ColumnWeight 4 2000,
			Transparent true,
			Child RowGroup
			{
				Child Label( Text "Groups:"),
				Child Label( Name GroupsReceived, Text "0", MinimumWidthText "0000", HorizontalAlignment 2),
				Child Label( Text "/"),
				Child Label( Name GroupsToReceive, Text "0", MinimumWidthText "0000"),
				Child Gauge( Name GroupsGauge, TotalValue 0, BarHeight 8, Width 200)
			},
			Child RowGroup
			{
				Child Label( Text "Messages:"),
				Child Label( Name MessagesProcessed, Text "0", MinimumWidthText "0000", HorizontalAlignment 2),
				Child Label( Text "/"),
				Child Label( Name MessagesToProcess, Text "0", MinimumWidthText "0000"),
				Child Gauge( Name MessagesGauge, TotalValue 0, BarHeight 8, Width 200)
			},
			Child RowGroup
			{
				Child Label( Text "Lines:"),
				Child Label( Name LinesSent, Text "0", MinimumWidthText "0000", HorizontalAlignment 2),
				Child Label( Text "/"),
				Child Label( Name LinesToSend, Text "0", MinimumWidthText "0000"),
				Child Gauge( Name LinesGauge, TotalValue 0, BarHeight 8, Width 200)
			}
		}
	}
}
