您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetTableSelection函数代码示例

51自学网 2021-06-01 21:15:52
  C++
这篇教程C++ GetTableSelection函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetTableSelection函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTableSelection函数的具体用法?C++ GetTableSelection怎么用?C++ GetTableSelection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetTableSelection函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GMFilter

voidGMFilterNameTable::NewFilter(){	if (!itsConditionTable->OKToSwitch() || !itsActionTable->OKToSwitch())		{		return;		}	GMFilter* filter	= new GMFilter();	assert(filter != NULL);	itsFilters->Append(filter);	JString nickname	= "filter" + JString(itsFilters->GetElementCount());	filter->SetNickname(nickname);	AppendRows(1, itsRowHeight);	itsConditionTable->SetFilter(filter);	itsActionTable->SetFilter(filter);	GetTableSelection().ClearSelection();	GetTableSelection().SelectCell(GetRowCount(), 1);	AdjustButtons();}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:25,


示例2: Broadcast

voidGLFitDescriptionList::HandleMouseDown	(	const JPoint& 			pt,	const JXMouseButton 	button,	const JSize 			clickCount,	const JXButtonStates&	buttonStates,	const JXKeyModifiers&	modifiers	){	JPoint cell;	if (button == kJXLeftButton && GetCell(pt, &cell))		{		if (GetTableSelection().IsSelected(cell) && clickCount == 2)			{			Broadcast(FitInitiated(cell.y));			}		else if (!GetTableSelection().IsSelected(cell) && clickCount == 1)			{			SelectSingleCell(cell);			Broadcast(FitSelected(cell.y));			}		}	else		{		ScrollForWheel(button, modifiers);		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:28,


示例3: GetTableSelection

voidSelectionTable::HandleTableMenu	(	const JIndex index	){	// A menu item from the Table menu was selected.	// Was it the Insert command?	if (index == kInsertCmd)		{		// Get the selection object that JTable owns.		JTableSelection& selection = GetTableSelection();		// Since we disable the Insert command if there is more than		// one cell selected or if none are selected, we know that		// one cell is selected. We assert that only one cell is		// selected.		JPoint cell;		// This finds the first selected cell, which in our case is		// the only selected cell.		const JBoolean ok = selection.GetFirstSelectedCell(&cell);		assert(ok);		// The default value is inserted before the selected cell.		itsData->InsertElementAtIndex(cell.y, kDefInsertValue);		}	// Was it the Remove command?	else if (index == kRemoveCmd)		{		// Get the selection object that JTable owns.		JTableSelection& selection = GetTableSelection();		// Create an iterator to iterate over each selected item.		JTableSelectionIterator iter(&selection);		// Loop through each selected cell.		JPoint cell;		while (iter.Next(&cell))			{			// Remove the element corresponding to the cell selected.			// The table will automatically adjust itself in the			// Receive function.			itsData->RemoveElement(cell.y);			}		}	// Was it the Quit command?	else if (index == kQuitCmd)		{		// Get the application object (from jXGlobals.h) and call Quit 		// to exit the program.		JXGetApplication()->Quit();		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:58,


示例4: GetTableSelection

voidSVNListBase::GetSelectedFiles	(	JPtrArray<JString>*	fullNameList,	const JBoolean		includeDeleted	){	fullNameList->CleanOut();	fullNameList->SetCleanUpAction(JPtrArrayT::kDeleteAll);	JTableSelection& s = GetTableSelection();	JTableSelectionIterator iter(&s);	JString name, fullName;	JPoint cell;	const JString& basePath = GetPath();	while (iter.Next(&cell))		{		const JString* line   = itsLineList->NthElement(cell.y);		name                  = ExtractRelativePath(*line);		const JBoolean exists = JConvertToAbsolutePath(name, basePath, &fullName);		if (exists || includeDeleted)			{			fullNameList->Append(fullName);			}		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:26,


示例5: CopySelectedItems

voidSVNListBase::HandleEditMenu	(	const JIndex index	){	const JString* id;	if (!itsEditMenu->GetItemID(index, &id))		{		return;		}	if (*id == kJXCopyAction)		{		CopySelectedItems(kJFalse);		}	else if (*id == kSVNCopyFullPathAction)		{		CopySelectedItems(kJTrue);		}	else if (*id == kJXSelectAllAction)		{		(GetTableSelection()).SelectAll();		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,


示例6: assert

voidSVNListBase::ReceiveMessageLine(){	assert( itsMessageLink != NULL );	JString line;	const JBoolean ok = itsMessageLink->GetNextMessage(&line);	assert( ok );	if (!ShouldDisplayLine(&line))		{		return;		}	const JFontStyle red(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetRedColor());	const JFontStyle blue = (GetColormap())->GetBlueColor();	const JFontStyle strike(kJFalse, kJFalse, 0, kJTrue);	JString* temp = new JString(line);	assert( temp != NULL );	JIndex i;	itsLineList->InsertSorted(temp, kJTrue, &i);	StyleLine(i, line, red, blue, strike);	JString relPath = ExtractRelativePath(line);	JIndex j;	if (itsSavedSelection->SearchSorted(&relPath, JOrderedSetT::kAnyMatch, &j))		{		(GetTableSelection()).SelectRow(i);		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:32,


示例7: DeleteLinks

voidSVNListBase::RefreshContent(){	if (itsProcess != NULL)		{		JProcess* p = itsProcess;		itsProcess  = NULL;		p->Kill();		delete p;		DeleteLinks();		}	else		{		itsSavedSelection->CleanOut();		JTableSelection& s = GetTableSelection();		JTableSelectionIterator iter(&s);		JPoint cell;		while (iter.Next(&cell))			{			const JString* line = itsLineList->NthElement(cell.y);			itsSavedSelection->InsertSorted(new JString(ExtractRelativePath(*line)));			}		}	itsDisplayState = SaveDisplayState();	itsLineList->CleanOut();	int outFD, errFD;	JError err = JNoError();	if ((GetDirector())->HasPath())		{		err = JProcess::Create(&itsProcess, GetPath(), itsCmd,							   kJIgnoreConnection, NULL,							   kJCreatePipe, &outFD,							   kJCreatePipe, &errFD);		}	else	// working with URL		{		err = JProcess::Create(&itsProcess, itsCmd,							   kJIgnoreConnection, NULL,							   kJCreatePipe, &outFD,							   kJCreatePipe, &errFD);		}	if (err.OK())		{		itsProcess->ShouldDeleteWhenFinished();		ListenTo(itsProcess);		(GetDirector())->RegisterActionProcess(this, itsProcess, itsRefreshRepoFlag,											   itsRefreshStatusFlag, itsReloadOpenFilesFlag);		SetConnection(outFD, errFD);		}	else		{		err.ReportIfError();		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:60,


示例8: GetTableSelection

JBooleanSVNPropertiesList::SchedulePropertiesForRemove(){	JTableSelection& s = GetTableSelection();	JTableSelectionIterator iter(&s);	JPoint cell;	JString cmd, prop, file = JPrepArgForExec(itsFullName);	JSubstitute subst;	while (iter.Next(&cell))		{		const JString* line = (GetStringList()).NthElement(cell.y);		prop = JPrepArgForExec(*line);		cmd = kPropRemoveCmd;		subst.DefineVariable("prop_name", prop);		subst.DefineVariable("file_name", file);		subst.Substitute(&cmd);		itsRemovePropertyCmdList->Append(cmd);		}	RemoveNextProperty();	return kJTrue;}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,


示例9: iter

voidJXTreeListWidget::HandlePrepareForNodeMove(){	// save selected nodes	itsReselectNodeList->RemoveAll();	JTableSelectionIterator iter(&(GetTableSelection()));	JPoint cell;	while (iter.Next(&cell))		{		JTreeNode* node = itsTreeList->GetNode(cell.y);		if (!itsReselectNodeList->Includes(node))			{			itsReselectNodeList->Append(node);			}		}	// save scroll position	std::ostringstream data;	WriteScrollSetup(data);	assert( itsSavedScrollSetup == NULL );	itsSavedScrollSetup = new JString(data.str());	assert( itsSavedScrollSetup != NULL );}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:27,


示例10: GetTableSelection

voidJX2DCurveNameList::HandleKeyPress	(	const int				key,	const JXKeyModifiers&	modifiers	){	JPoint cell;	JTableSelection& s = GetTableSelection();	const JBoolean ok  = s.GetFirstSelectedCell(&cell);	assert( ok );	if (key == kJUpArrow)		{		cell.y--;		if (CellValid(cell))			{			BeginEditing(cell);			}		}	else if (key == kJDownArrow)		{		cell.y++;		if (CellValid(cell))			{			BeginEditing(cell);			}		}	else		{		JXEditTable::HandleKeyPress(key, modifiers);		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:34,


示例11:

voidJXFSBindingTable::RemovePattern(){	JPoint cell;	if ((GetTableSelection()).GetFirstSelectedCell(&cell))		{		if ((itsBindingList->GetBinding(cell.y))->IsSystemBinding())			{			JGetUserNotification()->ReportError(JGetString(kCantRemoveSystemBindingID));			}		else			{			CancelEditing();			if (itsBindingList->DeleteBinding(cell.y))				{				RemoveRow(cell.y);				}			else				{				TableRefreshRow(cell.y);				GetWindow()->Update();				(JGetUserNotification())->DisplayMessage(JGetString(kReplacedBySystemID));				}			UpdateButtons();			Broadcast(DataChanged());			}		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:28,


示例12: GetTableSelection

voidCBSymbolTable::CopySelectedSymbolNames()	const{	itsKeyBuffer.Clear();	const JTableSelection& s = GetTableSelection();	if (s.HasSelection())		{		JPtrArray<JString> list(JPtrArrayT::kForgetAll);		CBLanguage lang;		CBSymbolList::Type type;		JTableSelectionIterator iter(&s);		JPoint cell;		while (iter.Next(&cell))			{			const JString& name = itsSymbolList->GetSymbol(CellToSymbolIndex(cell), &lang, &type);			list.Append(const_cast<JString*>(&name));			}		JXTextSelection* data = new JXTextSelection(GetDisplay(), list);		assert( data != NULL );		(GetSelectionManager())->SetData(kJXClipboardName, data);		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:28,


示例13: if

voidCMArray2DTable::HandleKeyPress	(	const int				key,	const JXKeyModifiers&	modifiers	){	if (key == kJReturnKey)		{		JPoint cell;		if (!IsEditing() && (GetTableSelection()).GetSingleSelectedCell(&cell))			{			BeginEditing(cell);			}		else			{			EndEditing();			}		}	else if (!IsEditing() && HandleSelectionKeyPress(key, modifiers))		{		// work has been done		}	else		{		JXStringTable::HandleKeyPress(key, modifiers);		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:30,


示例14:

voidCBMacroSetTable::SwitchDisplay(){	if (itsMacroIndex > 0)		{		const CBPrefsManager::MacroSetInfo info = itsMacroList->GetElement(itsMacroIndex);		itsActionTable->GetData(info.action);		itsMacroTable->GetData(info.macro);		}	JPoint cell;	if ((GetTableSelection()).GetFirstSelectedCell(&cell))		{		itsMacroIndex = cell.y;		const CBPrefsManager::MacroSetInfo info = itsMacroList->GetElement(itsMacroIndex);		itsActionTable->SetData(*(info.action));		itsMacroTable->SetData(*(info.macro));		itsRemoveRowButton->Activate();		}	else		{		itsMacroIndex = 0;		itsActionTable->ClearData();		itsMacroTable->ClearData();		itsRemoveRowButton->Deactivate();		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:31,


示例15: GetCell

voidGMAccountList::HandleMouseDown	(	const JPoint&			pt,	const JXMouseButton	button,	const JSize			clickCount,	const JXButtonStates&	buttonStates,	const JXKeyModifiers&	modifiers	){	JPoint cell;	if (button == kJXLeftButton && clickCount == 1 &&		GetCell(pt, &cell))		{		JTableSelection& s = GetTableSelection();		if (!s.IsSelected(cell) && itsDialog->OKToSwitchAccounts())			{			s.ClearSelection();			s.SelectRow(cell.y);			Broadcast(NameSelected(cell.y));			BeginEditing(cell);			}		else if (s.IsSelected(cell) && !IsEditing())			{			BeginEditing(cell);			}		}	else if (button > kJXRightButton)		{		ScrollForWheel(button, modifiers);		}}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:32,


示例16: if

voidCBCommandTable::HandleOptionsMenu	(	const JIndex index	){	JPoint cell;	const JBoolean ok = (GetTableSelection()).GetFirstSelectedCell(&cell);	assert( ok );	CBCommandManager::CmdInfo info = itsCmdList->GetElement(cell.y);	if (index == kIsMakeCmd)		{		info.isMake = !info.isMake;		if (info.isMake)			{			info.saveAll   = kJTrue;			info.useWindow = kJTrue;			}		}	else if (index == kIsCVSCmd)		{		info.isVCS = !info.isVCS;		if (info.isVCS)			{			info.saveAll = kJTrue;			}		}	else if (index == kSaveAllCmd)		{		info.saveAll = !info.saveAll;		}	else if (index == kOneAtATimeCmd)		{		info.oneAtATime = !info.oneAtATime;		}	else if (index == kUseWindowCmd)		{		info.useWindow = !info.useWindow;		if (!info.useWindow)			{			info.raiseWindowWhenStart = kJFalse;			}		}	else if (index == kRaisedWhenStartCmd)		{		info.raiseWindowWhenStart = !info.raiseWindowWhenStart;		}	else if (index == kBeepWhenFinishedCmd)		{		info.beepWhenFinished = !info.beepWhenFinished;		}	else if (index == kShowSeparatorCmd)		{		info.separator = !info.separator;		}	TableRefreshRow(cell.y);	itsCmdList->SetElement(cell.y, info);}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:60,


示例17: AddRow

voidCBMacroSetTable::Receive	(	JBroadcaster*	sender,	const Message&	message	){	if (sender == itsAddRowButton && message.Is(JXButton::kPushed))		{		AddRow();		}	else if (sender == itsRemoveRowButton && message.Is(JXButton::kPushed))		{		RemoveRow();		}	else		{		if (sender == &(GetTableSelection()))			{			SwitchDisplay();			}		JXStringTable::Receive(sender, message);		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:26,


示例18: iter

voidJXTreeListWidget::CloseSelectedNodes	(	const JBoolean closeSiblings,	const JBoolean closeDescendants	){	JTableSelectionIterator iter(&(GetTableSelection()));	JPoint cell;	while (iter.Next(&cell))		{		if (closeSiblings)			{			itsTreeList->CloseSiblings(cell.y);			}		if (closeDescendants)			{			itsTreeList->CloseDescendants(cell.y);			}		if (!closeSiblings && !closeDescendants)			{			itsTreeList->Close(cell.y);			}		}}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:25,


示例19: GetRowCount

voidGMFilterNameTable::HandleDNDDrop	(	const JPoint&		pt,	const JArray<Atom>& typeList,	const Atom			action,	const Time			time,	const JXWidget*	source	){	JIndex dropIndex	= itsCurrentDNDIndex;	if (dropIndex == 0)		{		dropIndex		= GetRowCount() + 1;		}	JPoint cell;	if (GetTableSelection().GetFirstSelectedCell(&cell))		{		if (cell.y == (JCoordinate)itsCurrentDNDIndex ||			cell.y == (JCoordinate)itsCurrentDNDIndex + 1)			{			return;			}		GMFilter* filter	= itsFilters->NthElement(cell.y);		itsFilters->Remove(filter);		JIndex newIndex		= dropIndex;		if (cell.y < (JCoordinate)newIndex)			{			newIndex--;			}		itsFilters->InsertAtIndex(newIndex, filter);		SelectFilter(newIndex);		}	HandleDNDLeave();}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:35,


示例20: GetTableSelection

voidJXTreeListWidget::SelectNodes	(	const JPtrArray<JTreeNode>& list	){	JTableSelection& s = GetTableSelection();	const JSize count = list.GetElementCount();	for (JIndex i=1; i<=count; i++)		{		const JTreeNode* node = list.NthElement(i);		JIndex index;		if (itsTreeList->FindNode(node, &index))			{			const JPoint cell(itsNodeColIndex, index);			s.SelectCell(cell);			if (!s.HasAnchor())				{				s.SetAnchor(cell);				}			s.SetBoat(cell);			}		}}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:26,


示例21: assert

JXInputField*CBCommandTable::CreateXInputField	(	const JPoint&		cell,	const JCoordinate	x,	const JCoordinate	y,	const JCoordinate	w,	const JCoordinate	h	){	assert( itsTextInput == NULL );	JTableSelection& s = GetTableSelection();	s.ClearSelection();	s.SelectCell(cell);	if (cell.x == kPathColumn)		{		CBCommandPathInput* pathInput =			new CBCommandPathInput(this, kFixedLeft, kFixedTop, x,y, w,h);		pathInput->SetBasePath(itsBasePath);		pathInput->ShouldAllowInvalidPath();		itsTextInput = pathInput;		}	else		{		itsTextInput = new JXInputField(this, kFixedLeft, kFixedTop, x,y, w,h);		}	assert( itsTextInput != NULL );	const CBCommandManager::CmdInfo info = itsCmdList->GetElement(cell.y);	const JString* text = NULL;	if (cell.x == kMenuTextColumn)		{		text = info.menuText;		}	else if (cell.x == kMenuShortcutColumn)		{		text = info.menuShortcut;		}	else if (cell.x == kScriptNameColumn)		{		text = info.name;		}	else if (cell.x == kCommandColumn)		{		text = info.cmd;		}	else if (cell.x == kPathColumn)		{		text = info.path;		}	assert( text != NULL );	itsTextInput->SetText(*text);	itsTextInput->SetFont(itsFontName, itsFontSize);	return itsTextInput;}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:58,


示例22: AppendCols

voidGMAccountList::GMAccountListX(){	AppendCols(1, kDefColWidth);	const JSize count	= itsAccountInfo->GetElementCount();	AppendRows(count, itsLineHeight);	GetTableSelection().SelectRow(1);	WantInput(kJFalse);}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:9,


示例23:

voidCBCommandTable::DuplicateCommand(){	JPoint cell;	if ((GetTableSelection()).GetFirstSelectedCell(&cell) && EndEditing())		{		itsCmdList->AppendElement((itsCmdList->GetElement(cell.y)).Copy());		AppendRows(1);		BeginEditing(JPoint(kCommandColumn, itsCmdList->GetElementCount()));		}}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:11,


示例24:

voidGMFilterNameTable::AdjustButtons(){	if (GetRowCount() == 0 || !GetTableSelection().HasSelection())		{		itsRemoveButton->Deactivate();		}	else		{		itsRemoveButton->Activate();		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:12,


示例25: GetEditMenuHandler

voidCMArray2DTable::UpdateEditMenu(){	JXTEBase* te = GetEditMenuHandler();	JIndex index;	if ((GetTableSelection()).HasSelection() &&		te->EditMenuCmdToIndex(JTextEditor::kCopyCmd, &index))		{		itsEditMenu->EnableItem(index);		}}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:12,



注:本文中的GetTableSelection函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetTalentSpellCost函数代码示例
C++ GetTabControl函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。