Example #1
0
	void Plugin::TabOpenRequested (const QByteArray& tabClass)
	{
		if (tabClass == "Blogique")
			CreateTab ();
		else
			qWarning () << Q_FUNC_INFO
					<< "unknown tab class"
					<< tabClass;
	}
void BaseTabStrip::AddTabAt(int model_index, const TabRendererData& data)
{
    BaseTab* tab = CreateTab();
    tab->SetData(data);

    TabData d = { tab, gfx::Rect() };
    tab_data_.insert(tab_data_.begin() + ModelIndexToTabIndex(model_index), d);

    AddChildView(tab);

    // Don't animate the first tab, it looks weird, and don't animate anything
    // if the containing window isn't visible yet.
    if(tab_count()>1 && GetWidget() && GetWidget()->IsVisible())
    {
        StartInsertTabAnimation(model_index);
    }
    else
    {
        DoLayout();
    }
}
Example #3
0
void CServerBrowser::SetupUI( float fX, float fY, float fWidth, float fHeight )
{
	// Create the gui tab panel
	m_pTabs = m_pGUI->CreateTabPanel();
	m_pTabs->SetPosition( Vector2( fX, fY ) );
	m_pTabs->SetSize( Vector2( (fWidth - 260), fHeight ) );
	m_pTabs->SetAlwaysOnTop( true );

	// Create the players list
	m_pPlayers = m_pGUI->CreateTabPanel();
	m_pPlayers->SetPosition( Vector2( ((fX + fWidth) - 250), fY ) );
	m_pPlayers->SetSize( Vector2( 250, fHeight ) );
	m_pPlayers->SetAlwaysOnTop( true );

	// Create the status label
	m_pStatusLabel = m_pGUI->CreateLabel ( "", m_pGUI->GetDefaultFont( true ) );
	m_pStatusLabel->SetSize ( Vector2 ( (fWidth - 260), 30 ) );
	m_pStatusLabel->SetPosition ( Vector2 ( fX, (fY + fHeight + 10) ) );

	// Create the players list tabs
	m_pPlayersTab = m_pPlayers->CreateTab( "Players" );
	m_pRulesTab = m_pPlayers->CreateTab( "Rules" );

	// Create the players grid list
	m_pPlayersGridList = m_pGUI->CreateGridList( m_pPlayersTab );
	m_pPlayersGridList->SetPosition( Vector2( 1, 1 ) );
	m_pPlayersGridList->SetSize( Vector2( 247, (fHeight - 26) ) );
	m_pPlayersGridList->AddColumn ( "Name", 0.65f );
	m_pPlayersGridList->AddColumn ( "Ping", 0.30f );

	// Create the locked image
	m_pLockedImage = m_pGUI->CreateStaticImage();
	m_pLockedImage->SetVisible( false );
	m_pLockedImage->LoadFromFile( "locked.png", SharedUtility::GetAbsolutePath( "data\\gui\\images" ) );
	m_pLockedImage->SetSize ( Vector2 ( 12, 12 ) );

	// Create the tabs
	CreateTab( INTERNET, "Internet", (fWidth - 262), (fHeight - 26) );
	CreateTab( HOSTED, "Hosted", (fWidth - 262), (fHeight - 26) );

	// Hide the server browser
	SetVisible( false );

	// Create the message box window
	m_pMessageBox = m_pGUI->CreateMessageBox ( "", "", "Close" );
	m_pMessageBox->SetVisible ( false );
	m_pMessageBox->GetWindow()->SetAlwaysOnTop ( true );
	m_pMessageBox->SetButtonClickHandler ( 0, Button1ClickHandler, this );

	// Create the quick connect window
	m_pQuickConnectWindow = m_pGUI->CreateWnd ( "Quick Connect" );
	m_pQuickConnectWindow->SetSize ( Vector2 ( 260, 155 ) );
	m_pQuickConnectWindow->SetPosition ( Vector2 ( (m_pGUI->GetResolution().fX / 2) - 150, (m_pGUI->GetResolution().fY / 2) - 77.5 ) );
	m_pQuickConnectWindow->SetVisible ( false );
	m_pQuickConnectWindow->SetAlwaysOnTop ( true );
	m_pQuickConnectWindow->SetSizingEnabled ( false );
	m_pQuickConnectWindow->SetAlpha ( 1.0f );

	// Create the quick connect label
	m_pQuickConnectLabel = m_pGUI->CreateLabel ( "Enter the server IP, Port and Password:"******"last-server-ip")) != 0);

	// Create the quick connect IP input
	m_pQuickConnectAddress = m_pGUI->CreateEdit ( (bRestoreInformation ? CVAR_GET_STRING ( "last-server-ip" ) : "127.0.0.1"), m_pQuickConnectWindow );
	m_pQuickConnectAddress->SetSize ( Vector2( 160, 24 ) );
	m_pQuickConnectAddress->SetPosition ( Vector2 ( 18, 50 ) );
	m_pQuickConnectAddress->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) );

	// Create the quick connect port input
	m_pQuickConnectPort = m_pGUI->CreateEdit ( (bRestoreInformation ? String ( "%d", CVAR_GET_INTEGER ( "last-server-port" ) ) : "27015"), m_pQuickConnectWindow );
	m_pQuickConnectPort->SetSize ( Vector2( 55, 24 ) );
	m_pQuickConnectPort->SetPosition ( Vector2 ( 183, 50 ) );
	m_pQuickConnectPort->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) );

	// Create the quick connect password input
	m_pQuickConnectPassword = m_pGUI->CreateEdit ( (bRestoreInformation ? CVAR_GET_STRING ( "last-server-password" ) : ""), m_pQuickConnectWindow );
	m_pQuickConnectPassword->SetSize ( Vector2( 220, 24 ) );
	m_pQuickConnectPassword->SetPosition ( Vector2( 18, 85 ) );
	m_pQuickConnectPassword->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) );
	m_pQuickConnectPassword->SetMasked ( true );

	// Create the quick connect submit button
	m_pQuickConnectSubmit = m_pGUI->CreateButton ( "Connect", m_pQuickConnectWindow );
	m_pQuickConnectSubmit->SetSize ( Vector2 ( 75, 20 ) );
	m_pQuickConnectSubmit->SetPosition ( Vector2 ( 18, 120 ) );
	m_pQuickConnectSubmit->SetClickHandler ( GUI_CALLBACK( &CServerBrowser::Event_QuickConnectSubmitClick, this ) );

	// Create the quick connect cancel button
	m_pQuickConnectCancel = m_pGUI->CreateButton ( "Cancel", m_pQuickConnectWindow );
	m_pQuickConnectCancel->SetSize ( Vector2 ( 75, 20 ) );
	m_pQuickConnectCancel->SetPosition ( Vector2 ( 100, 120 ) );
	m_pQuickConnectCancel->SetClickHandler ( GUI_CALLBACK( &CServerBrowser::Event_QuickConnectCancelClick, this ) );
}
Example #4
0
void CContextControl::OnTabContextNew(wxCommandEvent&)
{
	CreateTab();
}
Example #5
0
void CContextControl::OnTabBgDoubleclick(wxAuiNotebookEvent&)
{
	CreateTab();
}
Example #6
0
AGridUI *create_axisgrid_ui(ExplorerUI *eui)
{
    AGridUI *ui;
    int i;
    LabelOptionItem opitems[3];
    char buf[32];
    Widget tab, rc, rc2, rc3, fr;

    ui = xmalloc(sizeof(AGridUI));

    /* ------------ Tabs --------------*/
    tab = CreateTab(eui->scrolled_window); 
    AddHelpCB(tab, "doc/UsersGuide.html#axisgrid-properties");

    ui->main_tp = CreateTabPage(tab, "Grid");

    rc = CreateHContainer(ui->main_tp);
    opitems[0].value = AXIS_TYPE_X;
    opitems[0].label = "X";
    opitems[1].value = AXIS_TYPE_Y;
    opitems[1].label = "Y";
    ui->type = CreateLabelOptionChoice(rc, "Type:", 0, 2, opitems);
    AddOptionChoiceCB(ui->type, oc_explorer_cb, eui);

    fr = CreateFrame(ui->main_tp, "Spacing");
    rc = CreateVContainer(fr);

    rc2 = CreateHContainer(rc);
    ui->tmajor = CreateText2(rc2, "Major spacing:", 8);
    AddTextActivateCB(ui->tmajor, text_explorer_cb, eui);
    ui->nminor = CreateSpinChoice(rc2, "Minor ticks:",
        2, SPIN_TYPE_INT, 0.0, (double) MAX_TICKS - 1, 1.0);
    AddSpinChoiceCB(ui->nminor, sp_explorer_cb, eui);

    rc2 = CreateHContainer(rc);
    ui->tround = CreateToggleButton(rc2, "Place at rounded positions");
    AddToggleButtonCB(ui->tround, tb_explorer_cb, eui);
    ui->autonum = CreatePanelChoice(rc2, "Autotick divisions:",
        "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", NULL);
    AddOptionChoiceCB(ui->autonum, oc_explorer_cb, eui);

    rc2 = CreateHContainer(ui->main_tp);

    /* major grid lines */
    fr = CreateFrame(rc2, "Major grid lines");
    rc = CreateVContainer(fr);
    ui->tgrid = CreateToggleButton(rc, "Enabled");
    AddToggleButtonCB(ui->tgrid, tb_explorer_cb, eui);
    ui->tgridpen = CreatePenChoice(rc, "Pen:");
    AddPenChoiceCB(ui->tgridpen, pen_explorer_cb, eui);
    ui->tgridlinew = CreateLineWidthChoice(rc, "Line width:");
    AddSpinChoiceCB(ui->tgridlinew, sp_explorer_cb, eui);
    ui->tgridlines = CreateLineStyleChoice(rc, "Line style:");
    AddOptionChoiceCB(ui->tgridlines, oc_explorer_cb, eui);

    /* minor grid lines */
    fr = CreateFrame(rc2, "Minor grid lines");
    rc = CreateVContainer(fr);
    ui->tmgrid = CreateToggleButton(rc, "Enabled");
    AddToggleButtonCB(ui->tmgrid, tb_explorer_cb, eui);
    ui->tmgridpen = CreatePenChoice(rc, "Pen:");
    AddPenChoiceCB(ui->tmgridpen, pen_explorer_cb, eui);
    ui->tmgridlinew = CreateLineWidthChoice(rc, "Line width:");
    AddSpinChoiceCB(ui->tmgridlinew, sp_explorer_cb, eui);
    ui->tmgridlines = CreateLineStyleChoice(rc, "Line style:");
    AddOptionChoiceCB(ui->tmgridlines, oc_explorer_cb, eui);


    ui->label_tp = CreateTabPage(tab, "Axis bar");

    fr = CreateFrame(ui->label_tp, "Bar properties");
    rc = CreateVContainer(fr);

    rc2 = CreateHContainer(rc);
    ui->barpen = CreatePenChoice(rc2, "Pen:");
    AddPenChoiceCB(ui->barpen, pen_explorer_cb, eui);
    ui->barlines = CreateLineStyleChoice(rc2, "Line style:");
    AddOptionChoiceCB(ui->barlines, oc_explorer_cb, eui);

    ui->barlinew = CreateLineWidthChoice(rc, "Width:");
    AddSpinChoiceCB(ui->barlinew, sp_explorer_cb, eui);


    ui->tickmark_tp = CreateTabPage(tab, "Tick marks");

    rc2 = CreateHContainer(ui->tickmark_tp);

    /* major tick marks */
    fr = CreateFrame(rc2, "Major ticks");
    rc = CreateVContainer(fr);
    ui->tinout = CreateLabelOptionChoiceVA(rc, "Pointing:",
        "In",   TICKS_IN,
        "Out",  TICKS_OUT,
        "Both", TICKS_BOTH,
        NULL);
    AddOptionChoiceCB(ui->tinout, oc_explorer_cb, eui);
    ui->tlen = CreateSpinChoice(rc, "Tick length",
        4, SPIN_TYPE_FLOAT, 0.0, 100.0, 0.25);
    AddSpinChoiceCB(ui->tlen, sp_explorer_cb, eui);
    ui->tpen = CreatePenChoice(rc, "Pen:");
    AddPenChoiceCB(ui->tpen, pen_explorer_cb, eui);
    ui->tlinew = CreateLineWidthChoice(rc, "Line width:");
    AddSpinChoiceCB(ui->tlinew, sp_explorer_cb, eui);
    ui->tlines = CreateLineStyleChoice(rc, "Line style:");
    AddOptionChoiceCB(ui->tlines, oc_explorer_cb, eui);

    fr = CreateFrame(rc2, "Minor ticks");
    rc = CreateVContainer(fr);
    ui->tminout = CreateLabelOptionChoiceVA(rc, "Pointing:",
        "In",   TICKS_IN,
        "Out",  TICKS_OUT,
        "Both", TICKS_BOTH,
        NULL);
    AddOptionChoiceCB(ui->tminout, oc_explorer_cb, eui);
    ui->tmlen = CreateSpinChoice(rc, "Tick length",
        4, SPIN_TYPE_FLOAT, 0.0, 100.0, 0.25);
    AddSpinChoiceCB(ui->tmlen, sp_explorer_cb, eui);
    ui->tmpen = CreatePenChoice(rc, "Pen:");
    AddPenChoiceCB(ui->tmpen, pen_explorer_cb, eui);
    ui->tmlinew = CreateLineWidthChoice(rc, "Line width:");
    AddSpinChoiceCB(ui->tmlinew, sp_explorer_cb, eui);
    ui->tmlines = CreateLineStyleChoice(rc, "Line style:");
    AddOptionChoiceCB(ui->tmlines, oc_explorer_cb, eui);


    ui->ticklabel_tp = CreateTabPage(tab, "Tick labels");

    fr = CreateFrame(ui->ticklabel_tp, "Formatting");
    rc2 = CreateVContainer(fr);
    rc = CreateHContainer(rc2);
    ui->tlcharsize = CreateCharSizeChoice(rc, "Char size");
    AddSpinChoiceCB(ui->tlcharsize, sp_explorer_cb, eui);
    ui->tlangle = CreateAngleChoice(rc, "Angle:");
    AddSpinChoiceCB(ui->tlangle, sp_explorer_cb, eui);

    rc = CreateHContainer(rc2);
    ui->tlfont = CreateFontChoice(rc, "Font:");
    AddOptionChoiceCB(ui->tlfont, oc_explorer_cb, eui);
    ui->tlcolor = CreateColorChoice(rc, "Color:");
    AddOptionChoiceCB(ui->tlcolor, oc_explorer_cb, eui);

    rc = CreateHContainer(rc2);
    ui->tlform = CreateFormatChoice(rc);
    AddFormatChoiceCB(ui->tlform , format_explorer_cb, eui);


    fr = CreateFrame(ui->ticklabel_tp, "Placement");

    rc2 = CreateVContainer(fr);
    rc3 = CreateHContainer(rc2);
    ui->tlstarttype = CreatePanelChoice(rc3, "Start at:",
                                    "Axis min", "Specified:", NULL);
    AddOptionChoiceCB(ui->tlstarttype, oc_explorer_cb, eui);
    ui->tlstart = CreateText2(rc3, "", 8);
    AddTextActivateCB(ui->tlstart, text_explorer_cb, eui);

    rc3 = CreateHContainer(rc2);
    ui->tlstoptype = CreatePanelChoice(rc3, "Stop at:",
                                   "Axis max", "Specified:", NULL);
    AddOptionChoiceCB(ui->tlstoptype, oc_explorer_cb, eui);
    ui->tlstop = CreateText2(rc3, "", 8);
    AddTextActivateCB(ui->tlstop, text_explorer_cb, eui);

    fr = CreateFrame(ui->ticklabel_tp, "Extra");
    rc = CreateVContainer(fr);

    rc2 = CreateHContainer(rc);
    ui->tlskip = CreatePanelChoice(rc2, "Skip every:",
        "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL);
    AddOptionChoiceCB(ui->tlskip, oc_explorer_cb, eui);
    ui->tlstagger = CreatePanelChoice(rc2, "Stagger:",
        "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL);
    AddOptionChoiceCB(ui->tlstagger, oc_explorer_cb, eui);


    ui->tlformula = CreateText(rc, "Axis transform:");
    AddTextActivateCB(ui->tlformula, text_explorer_cb, eui);

    rc2 = CreateHContainer(rc);
    ui->tlprestr = CreateText(rc2, "Prepend:");
    TextSetLength(ui->tlprestr, 13);
    AddTextActivateCB(ui->tlprestr, text_explorer_cb, eui);
    ui->tlappstr = CreateText(rc2, "Append:");
    TextSetLength(ui->tlappstr, 13);
    AddTextActivateCB(ui->tlappstr, text_explorer_cb, eui);

    rc2 = CreateHContainer(rc);
    ui->tlgap_para = CreateText2(rc2, "Parallel offset:", 5);
    AddTextActivateCB(ui->tlgap_para, text_explorer_cb, eui);
    ui->tlgap_perp = CreateText2(rc2, "Perpendicular offset:", 5);
    AddTextActivateCB(ui->tlgap_perp, text_explorer_cb, eui);


    ui->special_tp = CreateTabPage(tab, "Special");

    opitems[0].value = TICKS_SPEC_NONE;
    opitems[0].label = "None";
    opitems[1].value = TICKS_SPEC_MARKS;
    opitems[1].label = "Tick marks";
    opitems[2].value = TICKS_SPEC_BOTH;
    opitems[2].label = "Tick marks and labels";
    ui->specticks = CreateLabelOptionChoice(ui->special_tp, "Special ticks:", 0, 3, opitems);
    AddOptionChoiceCB(ui->specticks, oc_explorer_cb, eui);

    ui->nspec = CreateSpinChoice(ui->special_tp, "Number of user ticks to use:",
        3, SPIN_TYPE_INT, 0.0, (double) MAX_TICKS, 1.0);
    AddSpinChoiceCB(ui->nspec, sp_explorer_cb, eui);
    CreateLabel(ui->special_tp, "Tick location - Label:");

    ui->sw = CreateScrolledWindow(ui->special_tp);
    WidgetSetHeight(ui->sw, 320);

    rc = CreateVContainer(ui->sw);

    for (i = 0; i < MAX_TICKS; i++) {
        rc3 = CreateHContainer(rc);
        sprintf(buf, "%2d", i);
        ui->specloc[i]   = CreateText2(rc3, buf, 12);
        AddTextActivateCB(ui->specloc[i], text_explorer_cb, eui);
        ui->speclabel[i] = CreateText2(rc3, "", 30);
        AddTextActivateCB(ui->speclabel[i], text_explorer_cb, eui);
    }

    SelectTabPage(tab, ui->main_tp);
    
    ui->top = tab;
    
    return ui;
}
Example #7
0
void CSearchView::OnButtonSearch() 
{
	// TODO: Add your control notification handler code here
	// Tab
	if(((CMainFrame *)AfxGetMainWnd())->m_bConnectedFlag == TRUE){	// 서버에 접속중일때만
		if(m_nTabCnt + 1 > MAX_SEARCH_COUNT){
			AfxMessageBox("더이상 검색할수 없습니다!\n검색된 목록을 지우십시요!");
			return;
		}
		int aa = ((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.m_nClntCount;
		if(aa == 0){
			AfxMessageBox("접속되있는 서버가 없습니다!");
			m_strKey = "";
			UpdateData(false);
			return;
		}	
		
		UpdateData(true);
		if(m_strKey == ""){
			GetDlgItem(IDC_EDIT_SEARCHKEY)->SetFocus();
			return;
		}
						
		char szFileName[256];
		sprintf(szFileName, "%s", m_strKey);
		if(strcmp(szFileName, "*.*") == 0){
			AfxMessageBox("*.* 파일은 검색할수 없습니다");
			m_strKey = "";
			UpdateData(false);
			return;
		}
		m_nSearchFileCnt = 0;	// 새로 탭이 추가되므로 검색된 파일의수도 0
		m_nTabCnt++;

		CreateTab(m_strKey, 0, 0);	// 동적으로 탭추가, 버튼으로 생성될때는 두번째 파라미터가 필요없음	

		// 서버에 메시지 전송
		CMyIOCPSocket *pSock = &(((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket);
		UINT curSel = m_comboFilter.GetCurSel();
		if(curSel == 0){	// 전체검색
			for(int i=0; i<pSock->m_nClntCount; i++){
				if(pSock->SendData(pSock->m_clntSock[i].pClntData, pSock->m_pClntIOData[i], P_SEARCH_FILE, szFileName, strlen(szFileName), TRUE) == FALSE){
					((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.ErrorHandling(2, "SendData()");		
				}
			}
		}else{	// 컴하나검색
			CString strIP;
			m_comboFilter.GetLBText(curSel, strIP);
			UINT nStart = strIP.Find("[", 0);
			UINT nEnd = strIP.Find("]", 0);
			strIP = strIP.Mid(nStart + 1, nEnd - nStart - 1);
			//AfxMessageBox(strIP);
			for(int i=0; i<pSock->m_nClntCount; i++){
				if(strcmp(strIP, inet_ntoa(pSock->m_clntSock[i].pClntData->clntAddr.sin_addr)) == 0){	// 아이피 비교
					if(pSock->SendData(pSock->m_clntSock[i].pClntData, pSock->m_pClntIOData[i], P_SEARCH_FILE, szFileName, strlen(szFileName), TRUE) == FALSE){
						((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.ErrorHandling(2, "SendData()");		
					}
					break;
				}
			}
			
		}

		m_listSearch.DeleteAllItems();	// 리스트의 모든목록 삭제

		CMainFrame *pMain = ((CMainFrame *)AfxGetMainWnd());
		pMain->m_searchListData[m_nTabCnt - 1].strSearchListFileName = m_strKey;	// 검색된 파일이름 저장

		
		m_strKey = "";
		UpdateData(false);
		GetDlgItem(IDC_EDIT_SEARCHKEY)->SetFocus();
	}else{
		AfxMessageBox("서버에 먼저 접속하십시요!");
		m_strKey = "";
		UpdateData(false);
	}
}
Example #8
0
void CSearchView::OnInitialUpdate() 
{
	CFormView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class

	m_listSearch.m_nType = SEARCHVIEW;	// 리스트가 지신의 기능만을 처리할수 있는 타입값

	// 접속되어있는 클라이언트의 목록을 추가
	m_comboFilter.AddString("전체");
	int count = ((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.m_nClntCount;
	char szClntName[256];
	char szClntIP[20];
	for(int i=0; i<count; i++){
		strcpy(szClntName, ((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.m_clntSock[i].clntName);
		strcpy(szClntIP, inet_ntoa(((CMainFrame *)AfxGetMainWnd())->m_myIOCPSocket.m_clntSock[i].pClntData->clntAddr.sin_addr));
		sprintf(szClntName, "%s [%s]", szClntName, szClntIP);
		m_comboFilter.AddString(szClntName);
	}
	
	m_comboFilter.SetCurSel(0);

	InsertColumn();	// 컬럼 추가

	// 처음에 탭내용이 하나도 없으면 탭컨트롤이 안보이게(처음부터 보이면 모양이 이상해짐)
	if(m_nTabCnt == 0){
		m_tabSearch.ShowWindow(FALSE);
	}

	CMainFrame *pMain = ((CMainFrame *)AfxGetMainWnd());

	pMain->GetSysImgList(m_listSearch, m_imgSmallList);	// 시스템아이콘얻기


	// 다른메뉴를 선택했다가 다시 이뷰를 선택하면 다시 초기화가 되므로 생성되었던 탭을 생성	
	if(m_nTabCnt != 0){
		
		UINT cnt = 0;	
		CString strName;	// 검색된 파일이름
		UINT nFileCnt;	// 검색된 파일수
		UINT nImage;	// 아이콘 이미지
		while(cnt != m_nTabCnt){		
			strName = pMain->m_searchListData[cnt].strSearchListFileName;
			nFileCnt = pMain->m_searchListData[cnt].nSearchListSize;
			nImage = 0;
			if(nFileCnt > 5){	// 검색된게 많으면 아이콘을 바꿈
				nImage = 1;
			}
			CreateTab(strName, nFileCnt, nImage);	// 동적으로 탭추가, 두번째 파라미터로 마지막 생성되는것만 리스트에 데이타를 넣는다		
			cnt ++;
		}
		CString strFileName;	// 파일명
		UINT nSize;		// 파일사이즈
		CString strServerName;	// 서버이름
		CString strServerIP;	// 서버아이피
		CString strServerInfo;	// 서버정보
		for(UINT i=0; i<nFileCnt; i++){	// 리스트 내용
			strFileName = pMain->m_searchListData[m_nTabCnt - 1].searchListData[i].strFileName;
			nSize = pMain->m_searchListData[m_nTabCnt - 1].searchListData[i].nByte;
			strServerName.Format("%s", pMain->m_searchListData[m_nTabCnt - 1].strServerName[i]);	// 서버이름
			strServerIP.Format("%s", pMain->m_searchListData[m_nTabCnt - 1].strServerIP[i]);	// 서버아이피
			strServerInfo.Format("%s [%s]", strServerName, strServerIP);
			AddItem(strFileName, nSize, strServerInfo, FALSE);
		}
	}
	
	GetDlgItem(IDC_EDIT_SEARCHKEY)->SetFocus();

	
}
Example #9
0
SSDataUI *create_ssd_ui(ExplorerUI *eui)
{
    SSDataUI *ui;

    Widget tab, fr, rc, rc1, wbut;
    
    ui = xmalloc(sizeof(SSDataUI));
    if (!ui) {
        return NULL;
    }
    memset(ui, 0, sizeof(SSDataUI));

    /* ------------ Tabs -------------- */

    tab = CreateTab(eui->scrolled_window);        
    AddHelpCB(tab, "doc/UsersGuide.html#ssd-properties");

    ui->top = tab;

    /* ------------ Main tab -------------- */
    ui->main_tp = CreateTabPage(tab, "Data");

    ui->mw = CreateTable("SSD", ui->main_tp,
                         EXTRA_SS_ROWS, EXTRA_SS_COLS,
                         VISIBLE_SS_ROWS, VISIBLE_SS_COLS);
    TableSSDInit(ui->mw);
    TableSetDefaultColWidth(ui->mw, CELL_WIDTH);
    TableSetDefaultColLabelAlignment(ui->mw, ALIGN_CENTER);

    AddTableDrawCellCB(ui->mw, drawcellCB, ui);
    AddTableLeaveCellCB(ui->mw, leaveCB, ui);
    AddTableEnterCellCB(ui->mw, enterCB, ui);
    AddTableLabelActivateCB(ui->mw, labelCB, ui);

    ui->popup = CreatePopupMenu(ui->mw);
    ui->delete_btn  = CreateMenuButton(ui->popup, "Delete column", '\0', col_delete_cb, ui);
    ui->index_btn   = CreateMenuButton(ui->popup, "Set as index", '\0', index_cb, ui);
    ui->unindex_btn = CreateMenuButton(ui->popup, "Unset index", '\0', unindex_cb, ui);


    /* ------------ Column props -------------- */
    ui->column_tp = CreateTabPage(tab, "Columns");
    ui->col_sel = CreateColChoice(ui->column_tp, "Column:", LIST_TYPE_SINGLE);
    AddListChoiceCB(ui->col_sel, col_cb, ui);

    ui->col_label = CreateCSText(ui->column_tp, "Label:");
    SetSensitive(ui->col_label->text, FALSE);
    AddTextInputCB(ui->col_label, text_explorer_cb, eui);

    
    /* ------------ Hotlink tab -------------- */
    ui->hotlink_tp = CreateTabPage(tab, "Hotlink");

    fr = CreateFrame(ui->hotlink_tp, "Hotlink");
    rc = CreateVContainer(fr);
    rc1 = CreateHContainer(rc);
    ui->hotlink = CreateToggleButton(rc1, "Enabled");
    ui->hotsrc  = CreateOptionChoiceVA(rc1, "Source type:",
        "Disk", SOURCE_DISK,
        "Pipe", SOURCE_PIPE,
        NULL);
    rc1 = CreateHContainer(rc);
    ui->hotfile = CreateTextItem(rc1, 20, "File name:");
    wbut = CreateButton(rc1, "Browse...");
    AddButtonCB(wbut, create_hotfiles_popup, ui);

    return ui;
}
Example #10
0
GraphUI *create_graph_ui(ExplorerUI *eui)
{
    GraphUI *ui;
    Widget tab, fr, rc, rc1;

    OptionItem opitems[4] = {
        {SCALE_NORMAL, "Linear"     },
        {SCALE_LOG,    "Logarithmic"},
        {SCALE_REC,    "Reciprocal" },
        {SCALE_LOGIT,  "Logit"      }
    };
    
    ui = xmalloc(sizeof(GraphUI));

    /* ------------ Tabs -------------- */

    tab = CreateTab(eui->scrolled_window);        
    AddHelpCB(tab, "doc/UsersGuide.html#graph-properties");


    /* ------------ Main tab -------------- */

    ui->main_tp = CreateTabPage(tab, "Main");

    fr = CreateFrame(ui->main_tp, "Presentation");
    rc1 = CreateVContainer(fr);

    rc = CreateHContainer(rc1);
    ui->graph_type = CreateOptionChoiceVA(rc, "Type:",
        "XY graph",          GRAPH_XY,
        "XY chart",          GRAPH_CHART,
        "Polar graph",       GRAPH_POLAR,
        "Smith chart (N/I)", GRAPH_SMITH,
        "Fixed",             GRAPH_FIXED,
        "Pie chart",         GRAPH_PIE,
        NULL);
    AddOptionChoiceCB(ui->graph_type, oc_explorer_cb, eui);
    ui->stacked = CreateToggleButton(rc, "Stacked chart");
    AddToggleButtonCB(ui->stacked, tb_explorer_cb, eui);

    rc = CreateHContainer(rc1);
    ui->flip_xy = CreateToggleButton(rc, "Flip XY (N/I)");
    AddToggleButtonCB(ui->flip_xy, tb_explorer_cb, eui);


    fr = CreateFrame(ui->main_tp, "X axis");
    rc1 = CreateVContainer(fr);
    
    rc = CreateHContainer(rc1);
    ui->start_x = CreateTextItem(rc, 10, "Start:");
    AddTextItemCB(ui->start_x, titem_explorer_cb, eui);
    ui->stop_x = CreateTextItem(rc, 10, "Stop:");
    AddTextItemCB(ui->stop_x, titem_explorer_cb, eui);

    rc = CreateHContainer(rc1);
    ui->scale_x = CreateOptionChoice(rc, "Scale:", 0, 4, opitems);
    AddOptionChoiceCB(ui->scale_x, axis_scale_cb, eui);
    AddOptionChoiceCB(ui->scale_x, oc_explorer_cb, eui);

    ui->invert_x = CreateToggleButton(rc, "Invert axis");
    AddToggleButtonCB(ui->invert_x, tb_explorer_cb, eui);
        
    fr = CreateFrame(ui->main_tp, "Y axis");
    rc1 = CreateVContainer(fr);
    
    rc = CreateHContainer(rc1);
    ui->start_y = CreateTextItem(rc, 10, "Start:");
    AddTextItemCB(ui->start_y, titem_explorer_cb, eui);
    ui->stop_y = CreateTextItem(rc, 10, "Stop:");
    AddTextItemCB(ui->stop_y, titem_explorer_cb, eui);

    rc = CreateHContainer(rc1);
    ui->scale_y = CreateOptionChoice(rc, "Scale:", 0, 4, opitems);
    AddOptionChoiceCB(ui->scale_y, axis_scale_cb, eui);
    AddOptionChoiceCB(ui->scale_y, oc_explorer_cb, eui);

    ui->invert_y = CreateToggleButton(rc, "Invert axis");
    AddToggleButtonCB(ui->invert_y, tb_explorer_cb, eui);

    fr = CreateFrame(ui->main_tp, "2D+ graphs");
    ui->znorm = CreateTextItem(fr, 10, "Z normalization");
    AddTextItemCB(ui->znorm, titem_explorer_cb, eui); 

    fr = CreateFrame(ui->main_tp, "XY charts");
    ui->bargap = CreateSpinChoice(fr, "Bar gap:", 5,
        SPIN_TYPE_FLOAT, -1.0, 1.0, 0.005);
    AddSpinChoiceCB(ui->bargap, sp_explorer_cb, eui);


    /* ------------ Locator tab -------------- */

    ui->locator_tp = CreateTabPage(tab, "Locator");
    ui->loc_type = CreateOptionChoiceVA(ui->locator_tp,
        "Locator display type:",
	"None",       GLOCATOR_TYPE_NONE,
	"[X, Y]",     GLOCATOR_TYPE_XY,
	"[Phi, Rho]", GLOCATOR_TYPE_POLAR,
	NULL);
    AddOptionChoiceCB(ui->loc_type, oc_explorer_cb, eui);

    fr = CreateFrame(ui->locator_tp, "X format");
    ui->loc_fx = CreateFormatChoice(fr);
    AddFormatChoiceCB(ui->loc_fx, format_explorer_cb, eui);
    
    fr = CreateFrame(ui->locator_tp, "Y format");
    ui->loc_fy = CreateFormatChoice(fr);
    AddFormatChoiceCB(ui->loc_fy, format_explorer_cb, eui);

    fr = CreateFrame(ui->locator_tp, "Fixed point");
    rc = CreateVContainer(fr);
    ui->fixedp = CreateToggleButton(rc, "Enable");
    AddToggleButtonCB(ui->fixedp, tb_explorer_cb, eui);
    rc1 = CreateHContainer(rc);
    ui->locx = CreateTextItem(rc1, 10, "X:");
    AddTextItemCB(ui->locx, titem_explorer_cb, eui);
    ui->locy = CreateTextItem(rc1, 10, "Y:");
    AddTextItemCB(ui->locy, titem_explorer_cb, eui);


    SelectTabPage(tab, ui->main_tp);

    ui->top = tab;
    
    return ui;
}