/**************************************************************
 * 
 * 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 "AutoControls.hrc"
#include "dbu_dlg.hrc"
#include "admincontrols.hrc"

#define LINE_HEIGHT             ( EDIT_HEIGHT + RELATED_CONTROLS )
#define SETTINGS_CONTROL_WIDTH  ( WIZARD_PAGE_X - 2 * START_X )
#define COLUMN_WIDTH_1      80
#define COLUMN_WIDTH_2      ( SETTINGS_CONTROL_WIDTH - COLUMN_WIDTH_1 )

Control RID_MYSQL_NATIVE_SETTINGS
{
    DialogControl = TRUE;
    Size = MAP_APPFONT( SETTINGS_CONTROL_WIDTH, 5 * LINE_HEIGHT );
    Hide = FALSE;

	FixedText FT_MYSQL_DATABASE_NAME
	{
		Pos = MAP_APPFONT ( 0, 2 );
		Size = MAP_APPFONT ( COLUMN_WIDTH_1 - UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT );
 		Text[ en-US ]  = "~Database name";
	};
	
	Edit ED_MYSQL_DATABASE_NAME
	{
		Pos = MAP_APPFONT ( COLUMN_WIDTH_1, 0 );
		Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
		Border = TRUE;
	};

    RadioButton RB_MYSQL_HOST_PORT
    {
        Pos = MAP_APPFONT ( 0, LINE_HEIGHT );
        Size = MAP_APPFONT ( COLUMN_WIDTH_1, FIXEDTEXT_HEIGHT ) ;
        Text [ en-US ]  = "Se~rver / Port" ;
        Group = TRUE;
    };

#define OPTION_GROUP_START  ( LINE_HEIGHT + FIXEDTEXT_HEIGHT + RELATED_CONTROLS )

    FixedText FT_COMMON_HOST_NAME
    {
        Pos = MAP_APPFONT ( INDENT_BELOW_RADIO, OPTION_GROUP_START + 2 );
        Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS - INDENT_BELOW_RADIO, FIXEDTEXT_HEIGHT );
        Text [ en-US ]  = "~Server" ;
    };

    Edit ED_COMMON_HOST_NAME
    {
        Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START );
        Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
		Border = TRUE;
    };

    FixedText FT_COMMON_PORT
    {
        Pos = MAP_APPFONT ( INDENT_BELOW_RADIO, OPTION_GROUP_START + LINE_HEIGHT + 2 );
        Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS - INDENT_BELOW_RADIO, FIXEDTEXT_HEIGHT ) ;
        Text [ en-US ]  = "~Port" ;
        Group = TRUE;
    };
	
    NumericField NF_COMMON_PORT
    {
        Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + LINE_HEIGHT );
        Size = MAP_APPFONT ( 25, EDIT_HEIGHT );
		Border = TRUE;
		NoThousandSep = TRUE;
		Value = 3306;
    };
	
    FixedText FT_COMMON_PORT_DEFAULT
    {
        Pos = MAP_APPFONT ( COLUMN_WIDTH_1 + 25 + RELATED_CONTROLS, OPTION_GROUP_START + LINE_HEIGHT + 2 );
        Size = MAP_APPFONT ( COLUMN_WIDTH_2 - 25 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
        Text[ en-US ] = "Default: 3306";
    };

    RadioButton RB_MYSQL_SOCKET
    {
        Pos = MAP_APPFONT ( 0, OPTION_GROUP_START + 2 * LINE_HEIGHT + 2 );
        Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
        Text [ en-US ] = "So~cket";
    };
	
    Edit ED_MYSQL_SOCKET
    {
        Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + 2 * LINE_HEIGHT );
        Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
		Border = TRUE ;
    };

    RadioButton RB_MYSQL_NAMED_PIPE
    {
        Pos = MAP_APPFONT ( 0, OPTION_GROUP_START + 2 * LINE_HEIGHT + 2 );
        Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
        Text [ en-US ] = "Named p~ipe";
    };
	
    Edit ED_MYSQL_NAMED_PIPE
    {
        Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + 2 * LINE_HEIGHT );
        Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
		Border = TRUE ;
    };
};
