Example #1
0
/* SetIntroWindow()
 * ================================================================
 * RETURN: if < 0, error
 */
int
SetIntroWindow( void )
{
   /* Open the Intro window */
   ad_tree = ad_intro;

   ActiveTree( ad_tree );
   FormCenter( ad_tree, &gl_work );
   ObX( ROOT ) = gl_work.g_x;
   ObY( ROOT ) = gl_work.g_y;

   wid = wind_create( MOVER | NAME | CLOSE, gl_full.g_x, gl_full.g_y,
		            		    gl_full.g_w, gl_full.g_h );

   if( wid > 0 )
   {
     wind_set( wid, WF_NAME, wtitle );
     wind_calc( WC_BORDER, MOVER | NAME | CLOSE,
	        gl_work.g_x, gl_work.g_y, gl_work.g_w, gl_work.g_h,
	        &gl_curr.g_x, &gl_curr.g_y, &gl_curr.g_w, &gl_curr.g_h );

     wind_open( wid, gl_curr.g_x, gl_curr.g_y, gl_curr.g_w, gl_curr.g_h );
   } else form_alert( 1, nowin );

   return( wid );
}
Example #2
0
//---------------------------------------------------------------------------
// サイズ変更コントロールの登録
void __fastcall TResCmpDlg::EntryAlignControl(void)
{
	RECT	rc;
	rc.left = 0;
	rc.top = 0;
	rc.right = 799;
	rc.bottom = 599;

	AlignList.EntryControl(OKBtn, &rc, OKBtn->Font);
	AlignList.EntryControl(PBox, &rc, PBox->Font);
	AlignList.EntryControl(Grid, &rc, Grid->Font);
	AlignList.EntryControl(LoadBtn, &rc, LoadBtn->Font);
	AlignList.EntryControl(DelBtn, &rc, DelBtn->Font);
	AlignList.EntryControl(ColBtn, &rc, ColBtn->Font);
	AlignList.EntryControl(WaveSel, &rc, WaveSel->Font);

	AlignGrid.InitGrid(Grid);

	int CX = ::GetSystemMetrics(SM_CXFULLSCREEN);
	int CY = ::GetSystemMetrics(SM_CYFULLSCREEN);
//	int CX = ::GetSystemMetrics(SM_CXSCREEN);
//	int CY = ::GetSystemMetrics(SM_CYSCREEN);
	if( (CX < Width)||(CY < Height) ){
		Top = 0;
		Left = 0;
		Width = CX;
		Height = CY;
	}
	FormCenter(this, CX, CY);
	if( Owner != NULL ){
		WindowState = ((TForm *)Owner)->WindowState;
	}
}
Example #3
0
//---------------------------------------------------------------------------
// サイズ変更コントロールの登録
void __fastcall TACalResDlg::EntryAlignControl(void)
{
	RECT	rc;
	rc.left = 0;
	rc.top = 0;
	rc.right = 639;
	rc.bottom = 599;

	AlignList.EntryControl(OKBtn, &rc, OKBtn->Font);
	AlignList.EntryControl(CancelBtn, &rc, CancelBtn->Font);
	AlignList.EntryControl(CalCond, &rc, CalCond->Font);
	AlignList.EntryControl(Grid, &rc, Grid->Font);
	AlignList.EntryControl(SortSel, &rc, SortSel->Font);
	AlignList.EntryControl(Label1, &rc, Label1->Font);
	AlignList.EntryControl(PBox, &rc, PBox->Font);

	AlignGrid.InitGrid(Grid);

	int CX = ::GetSystemMetrics(SM_CXFULLSCREEN);
	int CY = ::GetSystemMetrics(SM_CYFULLSCREEN);
//	int CX = ::GetSystemMetrics(SM_CXSCREEN);
//	int CY = ::GetSystemMetrics(SM_CYSCREEN);
	if( CX < Width ){
		Left = 0;
		Width = CX;
	}
	if( CY < Height ){
		Top = 0;
		Height = CY;
	}
	FormCenter(this, CX, CY);
	if( Owner != NULL ){
		WindowState = ((TForm *)Owner)->WindowState;
	}
}
Example #4
0
//---------------------------------------------------------------------
__fastcall TLogSetDlg::TLogSetDlg(TComponent* AOwner)
	: TForm(AOwner)
{
	m_DisEvent = 1;
	FormStyle = ((TForm *)AOwner)->FormStyle;
	Font->Name = ((TForm *)AOwner)->Font->Name;
	Font->Charset = ((TForm *)AOwner)->Font->Charset;
	if( sys.m_MsgEng ){
		TabConv->Caption = "Conversion";
		TabMisc->Caption = "Misc";
		CancelBtn->Caption = "Cancel";
		Caption = "Setup Logging";
		TabFlag->Caption = "Input";
		GrpConv->Caption = "Convert UpperCase";
		GrpCopy->Caption = "Copy Before Data";
		CopyFreq->Caption = "Copy Band or Freq.";
		CopyFreq->Items->Strings[0] = "Copy Band";
		CopyFreq->Items->Strings[1] = "Copy Freq.";
		DefMyRST->Caption = "599 Default";

		RGDupe->Caption = "Dupe Check (Show Red)";
		RGDupe->Items->Strings[0] = "Callsign only";
		RGDupe->Items->Strings[1] = "Hit on the same band";
		RGDupe->Items->Strings[2] = "Same band and same mode";
		AutoZone->Caption = "Ignore daylight saving";
		CBBackup->Caption = "Make backup";
		CBRemC->Visible = FALSE;

		GB3->Caption = "Link";
    	RGLink->Caption = "Application";

		GrpConv->Hint = "";
        GB1->Hint = "";
        RGLink->Hint = "Set linking Log program";
        CBPoll->Hint = "Get FREQ information from the Log program";
        CBPTT->Hint = "PTT controls via the Log program";
        GTime->Hint = "";
		AutoSave->Hint = "Flush(Save) Log file at the every QSO";
        CBBackup->Hint = "";
        RGDupe->Hint = "";

        GB9->Caption = "Mode";
	}
	else {
		LLink->Caption = "Hamlogの環境設定-設定1で\r\n「交信履歴表示で一旦停止」のチェックは付けないで下さい.";
	}
	if( sys.m_LCID == 0x0412 ){	// LANG_KOREAN
		TimeZone->Items->Strings[0] = "Korea";
	}
	else {
		TimeZone->Items->Strings[0] = "Japan";
	}
	m_MMList.QueryList("MML");
	for( int i = 0; i < m_MMList.GetCount(); i++ ){
		CBMMLink->Items->Add(m_MMList.GetItemName(i));
	}
    FormCenter(this);
}
Example #5
0
//---------------------------------------------------------------------
__fastcall TRADIOSetDlg::TRADIOSetDlg(TComponent* AOwner)
	: TForm(AOwner)
{
	FormStyle = ((TForm *)AOwner)->FormStyle;
	Font->Name = ((TForm *)AOwner)->Font->Name;
	Font->Charset = ((TForm *)AOwner)->Font->Charset;
	if( sys.m_MsgEng ){
		Caption = "Radio command";
		CancelBtn->Caption = "Cancel";

        GB1->Caption = "Port definition";
        GCmd->Caption = "Rig and commands";
        LVFO->Caption = "VFO polling";
        LInt->Caption = "Polling interval";
        RGFS->Caption = "Frequency offset";
        AddrScan->Caption = "Scan addr.";

		BitLen->Hint = "Choose 8Bits";
        Parity->Hint = "Choose None";
        GB3->Hint = "Uncheck both boxes (It might be FB)";
		GB2->Hint = "Check this, if you control PTT with the signal line";

		PortName->Hint = "Put the port name";
		Baud->Hint = "4800bps is normal";
		ByteWait->Hint = "Choose 0ms with recent Rig";
    	Maker->Hint = "Rig type";
        AddrScan->Hint = "Check this, if you don't know Rig-address";
        Cmdxx->Hint = "Rig-address (It depends on the Rig)";
        CmdInit->Hint = "Initialization command (FT847 is required)";
        CmdRx->Hint = "PTT to RX command";
        CmdTx->Hint = "PTT to TX command";
        VFOType->Hint = "Rig name of VFO polling";
		PollInt->Hint = "Choose long time if the frequency is disguised";
        RGFS->Hint = "Frequency correction by the mode";
   	}
	int i;
	for( i = 0; __MK[i] != NULL; i++ ){
		Maker->Items->Add(__MK[i]);
	}
	m_InitWidth = CmdInit->Width;
	m_PollType = 0;
	m_Maker = 0;
	m_MMList.QueryList("MMR");
	for( int i = 0; i < m_MMList.GetCount(); i++ ){
		PortName->Items->Insert(1, m_MMList.GetItemName(i));
	}
	PortName->DropDownCount = PortName->Items->Count;
    FormCenter(this);
	m_DisEvent = 0;
}
Example #6
0
//---------------------------------------------------------------------------
// サイズ変更コントロールの登録
void __fastcall TClockAdjDlg::EntryAlignControl(void)
{
	RECT	rc;
	rc.left = 0;
	rc.top = 0;
	rc.right = ClientWidth-1;
	rc.bottom = ClientHeight-1;

	AlignList.EntryControl(OKBtn, &rc, OKBtn->Font);
	AlignList.EntryControl(CancelBtn, &rc, CancelBtn->Font);
	AlignList.EntryControl(Panel, &rc, NULL);
	AlignList.EntryControl(TBGAIN, &rc, NULL);
	AlignList.EntryControl(SBAGC, &rc, SBAGC->Font);
	AlignList.EntryControl(MarkFreq, &rc, MarkFreq->Font);
	AlignList.EntryControl(UDMark, &rc, NULL);
	AlignList.EntryControl(Label2, &rc, Label2->Font);
	AlignList.EntryControl(LPPM, &rc, LPPM->Font);
	AlignList.EntryControl(EditClock, &rc, EditClock->Font);
	AlignList.EntryControl(UDSamp, &rc, NULL);
	AlignList.EntryControl(Label1, &rc, Label1->Font);

//	int CX = ::GetSystemMetrics(SM_CXFULLSCREEN);
//	int CY = ::GetSystemMetrics(SM_CYFULLSCREEN);
	int CX = ::GetSystemMetrics(SM_CXSCREEN);
	int CY = ::GetSystemMetrics(SM_CYSCREEN);
	if( (CX < Width)||(CY < Height) ){
		Top = 0;
		Left = 0;
		Width = CX;
		Height = CY;
	}
#if 0
	else {
		Top = 0;
		Left = 0;
		Width = 600;
		Height = 400;
	}
#endif
	FormCenter(this, CX, CY);
	if( Owner != NULL ){
		WindowState = ((TForm *)Owner)->WindowState;
	}
	m_rBase = 0;
}
Example #7
0
//TPlayDlgBox *PlayDlgBox;
//---------------------------------------------------------------------
__fastcall TPlayDlgBox::TPlayDlgBox(TComponent* AOwner)
	: TForm(AOwner)
{
	FormStyle = ((TForm *)AOwner)->FormStyle;
	Font->Name = ((TForm *)AOwner)->Font->Name;
	Font->Charset = ((TForm *)AOwner)->Font->Charset;

	pWave = NULL;
	m_DisEvent = 0;

	if( sys.m_MsgEng ){
		Caption = "Adjust Play position";
		CloseBtn->Caption = "Hide";
		StopBtn->Caption = "Stop";
		LRec->Caption = "RecTime";
		LNow->Caption = "NowTime";
	}
    FormCenter(this);
}
Example #8
0
//TFreqDispDlg *FreqDispDlg;
//---------------------------------------------------------------------
__fastcall TFreqDispDlg::TFreqDispDlg(TComponent* AOwner)
	: TForm(AOwner)
{
	FormStyle = ((TForm *)AOwner)->FormStyle;
	Font->Name = ((TForm *)AOwner)->Font->Name;
	Font->Charset = ((TForm *)AOwner)->Font->Charset;

	m_H1 = NULL;
	m_Tap1 = 0;
	m_H2 = NULL;
	m_Tap2 = 0;
	m_Max = 0;
    m_SampleFreq = SAMPFREQ;

	pBitmap = new Graphics::TBitmap();
	pBitmap->Width = PaintBox->Width;
	pBitmap->Height = PaintBox->Height;
	if( sys.m_MsgEng ){
		CancelBtn->Caption = "Close";
		Caption = "frequency characteristic";
	}
    FormCenter(this);
}
Example #9
0
//TLogListDlg *LogListDlg;
//---------------------------------------------------------------------
__fastcall TLogListDlg::TLogListDlg(TComponent* AOwner)
	: TForm(AOwner)
{
	FormStyle = ((TForm *)AOwner)->FormStyle;
	Font->Name = ((TForm *)AOwner)->Font->Name;
	Font->Charset = ((TForm *)AOwner)->Font->Charset;
	if( sys.m_MsgEng ){
		Grid->Font->Name = ((TForm *)AOwner)->Font->Name;
		Grid->Font->Charset = ((TForm *)AOwner)->Font->Charset;
		KFile->Caption = "File(&F)";
		KEdit->Caption = "Edit(&E)";
		KFind->Caption = "Find(&S)";
		KOpt->Caption = "Option(&O)";

		KOpen->Caption = "Open LogData File(&O)...";
		KFlush->Caption = "Save data now(&M)";
		KReIndex->Caption = "Make Index";
		KMTextRead->Caption = "Load MMLOG TextFile(&R)...";
		KMTextWrite->Caption = "Save selected range to MMLOG TextFile(&W)...";
		KImport->Caption = "Import";
		KImportLog200->Caption = "Log200 File...";
		KImportHamlog->Caption = "Hamlog File...";
		KImportADIF->Caption = "ADIF File...";
		KExport->Caption = "Export selected range";
		KExportADIF->Caption = "ADIF File...";
		KExportLog200->Caption = "Log200 File...";
		KExportHamlog->Caption = "Hamlog File...";
		KExportCabrillo->Caption = "Cabrillo file...";
		KExit->Caption = "Return to MMVARI(&X)";

		KDelCur->Caption = "Cut";
		KInsCur->Caption = "Insert";
		KSelAll->Caption = "Select All";
		KDelSel->Caption = "Delete selected range";
		KSortDate->Caption = "Sort(Date/Time)";

		KTop->Caption = "Move Top";
		KBottom->Caption = "Move Last";
		KFindTop->Caption = "Search forward...";
		KFindBottom->Caption = "Search backward...";
		KFindConT->Caption = "Search forward again";
		KFindConB->Caption = "Search backward again";

		KLogOpt->Caption = "Setup Logging...";
	}

	int CX = ::GetSystemMetrics(SM_CXFULLSCREEN);
	int CY = ::GetSystemMetrics(SM_CYFULLSCREEN);
	if( (CX < Width)||(CY < Height) ){
		Top = 0;
		Left = 0;
		Width = CX;
		Height = CY;
	}
	m_DateWidth = Grid->ColWidths[0];
	FormCenter(this, CX, CY);
	if( Owner != NULL ){
		WindowState = ((TForm *)Owner)->WindowState;
	}
	SetTimeZone();
    KExportCabrillo->Visible = FALSE;	// Delete this function by JE3HHT on Sep.2010
}
Example #10
0
/* SetNewDialog()
 * ================================================================
 */
void
SetNewDialog( OBJECT *newtree )
{
    OBJECT *oldtree;
    GRECT  old;

    oldtree = ad_tree;
    ActiveTree( ad_tree );

    old.g_x = ObX( ROOT );   
    old.g_y = ObY( ROOT );   
    old.g_w = ObW( ROOT );   
    old.g_h = ObH( ROOT );   

    ad_tree = newtree;
    ActiveTree( ad_tree );
    
    /* If the window has never been moved, center it */
    if( !gl_move )
       FormCenter( ad_tree, &gl_work );

    ObX( ROOT ) = gl_work.g_x;
    ObY( ROOT ) = gl_work.g_y;
    gl_work.g_w = ObW( ROOT );
    gl_work.g_h = ObH( ROOT );

    wind_calc( WC_BORDER, MOVER | NAME | CLOSE,
	       gl_work.g_x, gl_work.g_y, gl_work.g_w, gl_work.g_h,
	       &gl_curr.g_x, &gl_curr.g_y, &gl_curr.g_w, &gl_curr.g_h );

    wind_set( wid, WF_CURRXYWH, gl_curr.g_x, gl_curr.g_y, gl_curr.g_w, gl_curr.g_h );
    if( gl_gdos == XFSM )
       wind_set( wid, WF_NAME, wfsm );
    else
       wind_set( wid, WF_NAME, wfont );

    /* Don't send a redraw message IF we are using an AES >= 4.0 */
	if( 1 /*AES_Version < 0x0400*/ )
	{
		/* Send a redraw message if this is the same dialog box */
		/* This is good for the insert disk dialog box */
		/* Also send a message if the new dialog box is smaller than or
		 * equal to the previous one, to generate a redraw.
		 */
		if((oldtree == newtree)||((old.g_w>=ObW(ROOT))||
			(old.g_h>=ObH( ROOT )) ))
		{
			form_dial( FMD_FINISH, gl_work.g_x, gl_work.g_y, 
					   gl_work.g_w, gl_work.g_h,
					   gl_work.g_x, gl_work.g_y, gl_work.g_w, 
					   gl_work.g_h );
		}
    }
    else
    {
	/* But, if its the same tree, force a redraw...*/
    if( oldtree == newtree ) 
    { 
	form_dial( FMD_FINISH, gl_work.g_x, gl_work.g_y, gl_work.g_w, gl_work.g_h,
			       gl_work.g_x, gl_work.g_y, gl_work.g_w, gl_work.g_h );
    }

    }

}