newntui/commonresources/src/filterwizard.cpp
//---------------------------------------------------------------------------------------
//  Callback runs every time Remove button clicked. Will remove currently selected 
//  subexpression.
//---------------------------------------------------------------------------------------
Callback runs every time Remove button clicked. Will remove currently selected
subexpression.
Callback runs every time Remove button clicked . Will remove currently selected subexpression .
void CFilterWizard::OnRemovebutton()  {
int selection;
	selection=m_FlowTab.GetCurSel();
	if(selection<0) return;
	RemoveToken(selection);
   	m_FlowTab.DeleteItem(selection);
	CommandFromTokens();
	m_CommandEdit.SetWindowText(m_Command);
	if(m_TokensTable.GetSize()>0) {
       if((m_TokensTable.GetSize()-1)>=selection);
       else selection=m_TokensTable.GetSize()-1;
       m_FlowTab.SetCurSel(selection);
	   HighlightToken(selection);
	   ShowToken(m_TokensTable[selection]);
	} else {
	   m_RemoveButton.EnableWindow(FALSE);
	   m_ChangeButton.EnableWindow(FALSE);
	}
	SetModified(TRUE);
}
void CFilterWizard :: OnRemovebutton ( ) { int selection ; selection = m_FlowTab . GetCurSel ( ) ; if ( selection < 0 ) return ; RemoveToken ( selection ) ; m_FlowTab . DeleteItem ( selection ) ; CommandFromTokens ( ) ; m_CommandEdit . SetWindowText ( m_Command ) ; if ( m_TokensTable . GetSize ( ) > 0 ) { if ( ( m_TokensTable . GetSize ( ) - 1 ) >= selection ) ; else selection = m_TokensTable . GetSize ( ) - 1 ; m_FlowTab . SetCurSel ( selection ) ; HighlightToken ( selection ) ; ShowToken ( m_TokensTable [ selection ] ) ; } else { m_RemoveButton . EnableWindow ( FALSE ) ; m_ChangeButton . EnableWindow ( FALSE ) ; } SetModified ( TRUE ) ; }
Callback runs every time Remove button clicked.
Callback runs every time Remove button clicked .
// Removing token from the token array // Removing element from the subexpressions flowchart // Form the new command string // New command will be shown in the command editor // Selecting new item int the flow tab // Highlighting new token // We have nothing to change or remove // Can apply changes