/**************************************************************
 * 
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 * 
 *************************************************************/


#include "GroupsSorting.hrc"
#include "RptResId.hrc"
#include "helpids.hrc"
#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
#endif
#ifndef _SBASLTID_HRC
#include <svx/svxids.hrc>
#endif


FloatingWindow RID_GROUPS_SORTING
{
	OutputSize = TRUE ;
	SVLook = TRUE ;
    Size = MAP_APPFONT ( PAGE_WIDTH , PAGE_HEIGHT ) ;
	Text [ en-US ] = "Sorting and Grouping" ;
	HelpId = HID_RPT_GROUPSSORTING_DLG;
	Moveable = TRUE ;
	Closeable = TRUE ;
	Sizeable = TRUE;
	
	FixedLine FL_SEPARATOR2
	{
		Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
		Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
		Text [ en-US ] = "Groups";
	};
	
	Control WND_CONTROL
	{
		Pos = MAP_APPFONT( UNRELATED_CONTROLS, 2*UNRELATED_CONTROLS );
		Size = MAP_APPFONT( PAGE_WIDTH - 2*UNRELATED_CONTROLS, BROWSER_HEIGHT );
		HelpId = HID_RPT_GROUPSBRW ;
		Border = TRUE;
		TabStop = TRUE;
	};
	
	FixedText FT_MOVELABEL
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 3*UNRELATED_CONTROLS + BROWSER_HEIGHT ) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
//		Text [ en-US ] = "Move group" ;
		Text [ en-US ] = "Group actions" ;
	};
	
//     /*
//       |                                  PAGE_WIDTH                                            |
//       |                         /-----\            {-------\            /---------\            |
//       | unreleated FT_MOVELABEL |PB_UP| unreleated |PB_DOWN| unreleated |PD_DELETE| unreleated |
//       |                         \_____/            \_______/            \_________/            | 
// 
//       Don't set any position here, it will be done in OGroupsSortingDialog::Resize()
// 
//       Find possible IMAGEBUTTON_* in rscicpx.cxx
//       Symbol is vclrsc.hxx
//      */
// 	ImageButton PB_UP
// 	{
// 		Pos = MAP_APPFONT ( PAGE_WIDTH - 3*UNRELATED_CONTROLS - 3*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT -1 ) ;
// 		Size = MAP_APPFONT ( 14 , 14 ) ;
// 		TabStop = TRUE;
// //        Symbol = IMAGEBUTTON_ARROW_UP ; // arrow up
//         Symbol = IMAGEBUTTON_SPIN_UP ; // triangle up
// //        Symbol = IMAGEBUTTON_FLOAT;
// 	};
// 	
// 	ImageButton PB_DOWN
// 	{
// 		Pos = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS - 2*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
// 		Size                = MAP_APPFONT ( 14 , 14 ) ;
// 		TabStop = TRUE;
// //        Symbol = IMAGEBUTTON_ARROW_DOWN ; // arrow down
// //        Symbol = IMAGEBUTTON_FIRST ;
//         Symbol = IMAGEBUTTON_SPIN_DOWN;
// 
// 	};
// 	
// 	ImageButton PB_DELETE
// 	{
// 		Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 14, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
// 		Size                = MAP_APPFONT ( 14 , 14 ) ;
// 		TabStop = TRUE;
//         Symbol = IMAGEBUTTON_CLOSE ;
// 	};


	ToolBox TB_TOOLBOX
	{
		Pos = MAP_APPFONT ( PAGE_WIDTH - 4*14 - UNRELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
		ButtonType = BUTTON_SYMBOL;
// 		Align = BOXALIGN_TOP;
// 		HelpId = HID_RPT_CONDFORMAT_TB;
		Customize = FALSE;
		ItemList =
		{
			ToolBoxItem
			{
				Identifier = SID_RPT_GROUPSORT_MOVE_UP ;
				// Command = ".uno:ReportGroupMoveUp" ; // default_images/res/commandimages/sc_reportgroupmoveup.png
				HelpID = HID_RPT_GROUPSORT_MOVE_UP ; 
				Text [ en-US ] = "Move up" ;
				Checkable = TRUE;
//                Disable              = TRUE;
			};
			ToolBoxItem
			{
				Identifier = SID_RPT_GROUPSORT_MOVE_DOWN ;
				// Command = ".uno:ReportGroupMoveDown" ; 
				HelpID = HID_RPT_GROUPSORT_MOVE_DOWN ;
				Text [ en-US ] = "Move down" ;
				Checkable = TRUE;
//                Disable              = TRUE;
			};
			ToolBoxItem
			{
				Identifier = SID_RPT_GROUPSORT_DELETE ;
				// Command = ".uno:ReportGroupDelete" ;
				HelpID = HID_RPT_GROUPSORT_DELETE ;
				Text [ en-US ] = "~Delete" ;
				Checkable = TRUE;
//                Disable              = TRUE;
			};
		};
	};

	FixedLine FL_SEPARATOR3
	{
		Pos = MAP_APPFONT ( RELATED_CONTROLS , 3*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT) ;
		Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
		Text [ en-US ] = "Properties";
	};
	
	FixedText FT_ORDER
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 4*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + FIXEDTEXT_HEIGHT ) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
        Text [ en-US ] = "Sorting" ;
	};
	ListBox LST_ORDER
	{
	    HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_ORDER";
		Border = TRUE;
		Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 4*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + FIXEDTEXT_HEIGHT - 1 );
		Size = MAP_APPFONT( LISTBOX_WIDTH, 60 );
		DropDown = TRUE;
		TabStop = TRUE;
		Hide = TRUE;
		CurPos = 0 ;
		StringList [ en-US ] =
		{
			< "Ascending" ; 0 ; > ;
			< "Descending" ; 1 ; > ;
		};
		
	};
	FixedText FT_HEADER
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
		Text [ en-US ] = "Group Header" ;
		
	};
	ListBox LST_HEADERLST
	{
	    HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_HEADERLST";
		Border = TRUE;
		Hide = TRUE;
		Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 5*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 2*FIXEDTEXT_HEIGHT -1);
		Size = MAP_APPFONT( LISTBOX_WIDTH, 60 );
		DropDown = TRUE;
		TabStop = TRUE;
		CurPos = 1 ;
		StringList [ en-US ] =
		{
			< "Present" ; Default ; > ;
			< "Not present" ; Default ; > ;
		};
	};
	FixedText FT_FOOTER
	{
		Pos = MAP_APPFONT (  UNRELATED_CONTROLS, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
        Text [ en-US ] = "Group Footer" ;
		
	};
	ListBox LST_FOOTERLST
	{
	    HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_FOOTERLST";
		Border = TRUE;
		Hide = TRUE;
		Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 6*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 3*FIXEDTEXT_HEIGHT -1);
		Size = MAP_APPFONT( LISTBOX_WIDTH, 60 );
		DropDown = TRUE;
		TabStop = TRUE;
		CurPos = 1 ;
		StringList [ en-US ] =
		{
			< "Present" ; Default ; > ;
			< "Not present" ; Default ; > ;
		};
	};
	FixedText FT_GROUPON
	{
		Pos = MAP_APPFONT (  UNRELATED_CONTROLS, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
		Text [ en-US ] = "Group On" ;
		
	};
	ListBox LST_GROUPONLST
	{
	    HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_GROUPONLST";
		Border = TRUE;
		Hide = TRUE;
		Pos = MAP_APPFONT( 2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH, 7*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 4*FIXEDTEXT_HEIGHT -1);
		Size = MAP_APPFONT( LISTBOX_WIDTH, 60 );
		DropDown = TRUE;
		TabStop = TRUE;
		CurPos = 0 ;
		StringList [ en-US ] =
		{
			< "Each Value" ; Default ; > ;
		};
	};
	FixedText FT_GROUPINTERVAL
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
        Text [ en-US ] = "Group Interval" ;
	};
	NumericField ED_GROUPINTERVALLST
	{
	    HelpID = "reportdesign:NumericField:RID_GROUPS_SORTING:ED_GROUPINTERVALLST";
		Border = TRUE;
		Hide = TRUE;
		Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 8*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 5*FIXEDTEXT_HEIGHT -1);
		Size = MAP_APPFONT( LISTBOX_WIDTH, EDIT_HEIGHT );
		TabStop = TRUE;
	};
	
	FixedText FT_KEEPTOGETHER
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 9*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 6*FIXEDTEXT_HEIGHT) ;
        Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
        Hide = TRUE;
		Text [ en-US ] = "Keep Together" ;
	};
	ListBox LST_KEEPTOGETHERLST
	{
	    HelpID = "reportdesign:ListBox:RID_GROUPS_SORTING:LST_KEEPTOGETHERLST";
		Border = TRUE;
		Hide = TRUE;
		Pos = MAP_APPFONT(2*UNRELATED_CONTROLS + FIXEDTEXT_WIDTH , 9*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 6*FIXEDTEXT_HEIGHT -1);
		Size = MAP_APPFONT( LISTBOX_WIDTH, 60 );
		DropDown = TRUE;
		TabStop = TRUE;
		CurPos = 0 ;
		StringList [ en-US ] =
		{
			< "No" ; 0 ; > ;
			< "Whole Group" ; 1 ; > ;
			< "With First Detail" ; 2 ; > ;
		};
	};
	
	FixedLine FL_SEPARATOR1
	{
		Pos = MAP_APPFONT ( RELATED_CONTROLS , 10*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 7*FIXEDTEXT_HEIGHT) ;
		Size = MAP_APPFONT ( PAGE_WIDTH - 2*RELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ;
		Text [ en-US ] = "Help";
	};
	
	FixedText HELP_FIELD
	{
		Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 12*UNRELATED_CONTROLS + BROWSER_HEIGHT + BUTTON_HEIGHT + 7*FIXEDTEXT_HEIGHT) ;
		Size = MAP_APPFONT( PAGE_WIDTH - 2*UNRELATED_CONTROLS, 4*FIXEDTEXT_HEIGHT);
		WordBreak = TRUE;
	};
	
//BTN 	Image IMG_UP_H
//BTN 	{
//BTN 		ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; };
//BTN 	};
//BTN 	Image IMG_DOWN_H
//BTN 	{
//BTN 		ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; };
//BTN 	};


};

String STR_RPT_EXPRESSION
{
	Text [ en-US ] = "Field/Expression" ;
};
String STR_RPT_SORTING
{
	Text [ en-US ] = "Sort Order" ;
};
String STR_RPT_PREFIXCHARS
{
	Text [ en-US ] = "Prefix Characters" ;
};
String STR_RPT_YEAR
{
	Text [ en-US ] = "Year" ;
};
String STR_RPT_QUARTER
{
	Text [ en-US ] = "Quarter" ;
};
String STR_RPT_MONTH
{
	Text [ en-US ] = "Month" ;
};
String STR_RPT_WEEK
{
	Text [ en-US ] = "Week" ;
};
String STR_RPT_DAY
{
	Text [ en-US ] = "Day" ;
};
String STR_RPT_HOUR
{
	Text [ en-US ] = "Hour" ;
};
String STR_RPT_MINUTE
{
	Text [ en-US ] = "Minute" ;
};
String STR_RPT_INTERVAL
{
	Text [ en-US ] = "Interval" ;
};

String STR_RPT_HELP_FIELD
{
	Text [ en-US ] = "Select a field or type an expression to sort or group on." ;
};

String STR_RPT_HELP_HEADER
{
	Text [ en-US ] = "Display a header for this group?" ;
};

String STR_RPT_HELP_FOOTER
{
	Text [ en-US ] = "Display a footer for this group?" ;
};
String STR_RPT_HELP_GROUPON
{
	Text [ en-US ] = "Select the value or range of values that starts a new group." ;
};
String STR_RPT_HELP_INTERVAL
{
	Text [ en-US ] = "Interval or number of characters to group on." ;
};
String STR_RPT_HELP_KEEP
{
	Text [ en-US ] = "Keep group together on one page?" ;
};
String STR_RPT_HELP_SORT
{
	Text [ en-US ] = "Select ascending or descending sort order. Ascending means from A to Z or 0 to 9" ;
};


Menu RID_GROUPSROWPOPUPMENU
{
	ItemList =
	{
/*	
		MenuItem
		{
			ITEM_EDIT_CUT
		};
		MenuItem
		{
			ITEM_EDIT_COPY
		};
		MenuItem
		{
			ITEM_EDIT_PASTE
		};
*/
		MenuItem
		{
			ITEM_EDIT_DELETE
		};
	};
};


#define DEF_MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }

#define DEF_IL_GROUPSORT \
\
    IdList = {\
		SID_RPT_GROUPSORT_MOVE_UP;\
		SID_RPT_GROUPSORT_MOVE_DOWN;\
		SID_RPT_GROUPSORT_DELETE;\
		};\
	IdCount = {\
	3;\
	}

ImageList IMGLST_GROUPSORT_DLG_SC
{
    DEF_MASKCOLOR;
	prefix = "sc";
	DEF_IL_GROUPSORT ;
};

ImageList IMGLST_GROUPSORT_DLG_SCH
{
    DEF_MASKCOLOR;
	prefix = "sch";
	DEF_IL_GROUPSORT ;
};


// Image IMG_GROUPSORT_MOVEUP
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupmoveup"; // reportdesign/res/...
//     };
//     DEF_MASKCOLOR;
// };
// Image IMG_GROUPSORT_MOVEDOWN
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupmovedown";
//     };
//     DEF_MASKCOLOR;
// };
// Image IMG_GROUPSORT_DELETE
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupdelete";
//     };
//     DEF_MASKCOLOR;
// };
// 
// Image IMG_GROUPSORT_MOVEUP_H
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupmoveup_h"; // reportdesign/res/...
//     };
//     DEF_MASKCOLOR;
// };
// Image IMG_GROUPSORT_MOVEDOWN_H
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupmovedown_h";
//     };
//     DEF_MASKCOLOR;
// };
// Image IMG_GROUPSORT_DELETE_H
// {
//     ImageBitmap = Bitmap
//     {
//         File = "reportgroupdelete_h";
//     };
//     DEF_MASKCOLOR;
// };
