本文整理汇总了C++中GetTableSelection函数的典型用法代码示例。如果您正苦于以下问题:C++ GetTableSelection函数的具体用法?C++ GetTableSelection怎么用?C++ GetTableSelection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetTableSelection函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GMFilter
void
GMFilterNameTable::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,代码来源:GMFilterNameTable.cpp
示例2: Broadcast
void
GLFitDescriptionList::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,代码来源:GLFitDescriptionList.cpp
示例3: GetTableSelection
void
SelectionTable::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,代码来源:SelectionTable.cpp
示例4: GetTableSelection
void
SVNListBase::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,代码来源:SVNListBase.cpp
示例5: CopySelectedItems
void
SVNListBase::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,代码来源:SVNListBase.cpp
示例6: assert
void
SVNListBase::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,代码来源:SVNListBase.cpp
示例7: DeleteLinks
void
SVNListBase::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,代码来源:SVNListBase.cpp
示例8: GetTableSelection
JBoolean
SVNPropertiesList::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,代码来源:SVNPropertiesList.cpp
示例9: iter
void
JXTreeListWidget::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,代码来源:JXTreeListWidget.cpp
示例10: GetTableSelection
void
JX2DCurveNameList::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,代码来源:JX2DCurveNameList.cpp
示例11:
void
JXFSBindingTable::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,代码来源:JXFSBindingTable.cpp
示例12: GetTableSelection
void
CBSymbolTable::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,代码来源:CBSymbolTable.cpp
示例13: if
void
CMArray2DTable::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,代码来源:CMArray2DTable.cpp
示例14:
void
CBMacroSetTable::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,代码来源:CBMacroSetTable.cpp
示例15: GetCell
void
GMAccountList::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,代码来源:GMAccountList.cpp
示例16: if
void
CBCommandTable::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,代码来源:CBCommandTable.cpp
示例17: AddRow
void
CBMacroSetTable::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,代码来源:CBMacroSetTable.cpp
示例18: iter
void
JXTreeListWidget::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,代码来源:JXTreeListWidget.cpp
示例19: GetRowCount
void
GMFilterNameTable::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,代码来源:GMFilterNameTable.cpp
示例20: GetTableSelection
void
JXTreeListWidget::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,代码来源:JXTreeListWidget.cpp
注:本文中的GetTableSelection函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论