本文整理汇总了C++中SetReadOnly函数的典型用法代码示例。如果您正苦于以下问题:C++ SetReadOnly函数的具体用法?C++ SetReadOnly怎么用?C++ SetReadOnly使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetReadOnly函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetLineCount
int CxEdit::DeleteLine(int nLine, BOOL bScroll, int nCount /*= 1*/)
{
if (nCount >= 1)
{
const int linecount = GetLineCount();
const BOOL bFirstLine = (nLine == 0);
const BOOL bLastLine = (nLine == (linecount - 1));
//TRACE("%i,%i,%i\n", LineIndex(nLine - 1), LineLength(nLine - 1), LineIndex(nLine));
const int nStartChar = (bLastLine && (!bFirstLine))
? (LineIndex(nLine - 1) + LineLength(nLine - 1) + 0)
: LineIndex(nLine);
const int nEndChar = ((nLine + nCount) >= linecount)
? (LineIndex(linecount - 1) + LineLength(linecount - 1) + 0)
: LineIndex(nLine + nCount);
const BOOL bReadOnly = IsStyleReadOnly();
if (bReadOnly)
{
SetReadOnly(FALSE);
}
SetSel(nStartChar, nEndChar, !bScroll); // end of edit text
Clear(); // ..then delete
GotoEnd(bScroll);
if (bReadOnly)
{
SetReadOnly(TRUE);
}
}
return GetLineCount();
}
示例2: SetReadOnly
BOOL CRGXEvents::OnLButtonClickedRowCol(ROWCOL nRow,
ROWCOL nCol,
UINT nFlags,
CPoint pt)
{
long lEventNr = 0;
//TRACE("OnLButtonClickedRowCol!\n");
SetReadOnly(FALSE);
SetStyleRange(CGXRange(1, 0, GetRowCount(), 12),
CGXStyle().SetFont(CGXFont()./*SetSize(14).*/SetBold(FALSE))
);
SetStyleRange(CGXRange(nRow, 0, nRow, 12),
CGXStyle().SetFont(CGXFont()./*SetSize(14).*/SetBold(TRUE))
);
SetReadOnly(TRUE);
if (nRow >= 1)
{
//TRACE("Valittu rivi %d\n", nRow);
m_lCurrentLoanEventNr = atol(GetValueRowCol(nRow,17));
GetParent()->SendMessage(WM_COMMAND,
GetDlgCtrlID() | RJ_OG_PARENT_DLG << 16,
(LONG) GetSafeHwnd());
}
return TRUE;
}
示例3: SetReadOnly
void CatheterGrid::setRowReadOnly(int row, bool readOnly) {
if (row >= GetNumberRows())
return;
SetReadOnly(row, CHANNEL_COL, readOnly);
SetReadOnly(row, CURRENT_COL, readOnly);
SetReadOnly(row, DIRECTION_COL, readOnly);
SetReadOnly(row, DELAY_COL, readOnly);
}
示例4: SetReadOnly
void ZoomText::DoClear()
{
m_classes.clear();
m_locals.clear();
SetReadOnly(false);
SetText("");
SetReadOnly(true);
}
示例5: GetReadOnly
/*---------------------------------------------------------------------------*/
void wxDDLEditor::SetValue(const wxString& value)
{
bool ro = GetReadOnly();
SetReadOnly(false);
SetText(value);
SetReadOnly(ro);
}
示例6: SetReadOnly
void CatheterCmdGrid::setRowReadOnly(int row, bool ReadOnly) {
SetReadOnly(row, CHANNEL_COL, ReadOnly);
SetReadOnly(row, CURRENT_COL, ReadOnly);
SetReadOnly(row, DIR_COL, ReadOnly);
SetReadOnly(row, DELAY_COL, ReadOnly);
Fit();
}
示例7: SetReadOnly
void OutputCtrl::Clear()
{
SetReadOnly( false );
ClearAll();
SetReadOnly( true );
m_Selected = -1;
ClearErrors();
}
示例8: SetReadOnly
void CRGXDeskLogRows::clear()
{
SetReadOnly(FALSE);
SetTopRow(1);
MoveCurrentCell(GX_TOPLEFT);
SetRowCount(0);
Redraw();
SetReadOnly(TRUE);
}
示例9: DoClear
void ZoomText::UpdateText(IEditor* editor)
{
if(!editor) {
DoClear();
} else {
SetReadOnly(false);
SetText(editor->GetEditorText());
SetReadOnly(true);
SetCurrentPos(editor->GetCurrentPosition());
}
}
示例10: SetStatus
void DisassemblyTextCtrl::OnDclick(wxMouseEvent& event)
{
if(GetStatus())
{
SetStatus(0);
PluginsArray plugins = Manager::Get()->GetPluginManager()->GetDebuggerOffers();
if (plugins.GetCount())
{
cbDebuggerPlugin* dbg = (cbDebuggerPlugin*)plugins[0];
if (dbg)
{
// is the debugger running?
if (dbg->IsRunning())
{
dbg->StepByStep();
}
}
}
}
int LineNum = GetCurrentLine();
int L2 = GetCurrentLine();
wxString LineText,SourceFile;
unsigned long SourceLine=0;
while(LineNum > 0)
{
LineText = GetLine(LineNum--);
if(reRelativePath.Matches(LineText))
break;
}
if(LineText.IsEmpty())
return ;
LineText.AfterLast(_T(':')).ToULong(&SourceLine,10);
SourceFile = Manager::Get()->GetProjectManager()->GetActiveProject()->GetBasePath();
SourceFile << LineText.Before(_T(':'));
SyncEditor(LineText.Before(_T(':')),SourceLine,true);
SetReadOnly(false);
MarkerDeleteAll(DEBUG_MARKER);
MarkerAdd(SourceLine,DEBUG_MARKER);
SetReadOnly(true);
//wxMessageBox(wxString::Format(_T("%s:%d"),SourceFile.c_str(),SourceLine));
event.Skip();
}
示例11: AppendRows
void Threads::AddThread(const wxString &id, const wxString &name)
{
AppendRows();
SetCellValue(numThreads, 0, id);
SetCellValue(numThreads, 1, name);
SetReadOnly(numThreads, 0);
SetReadOnly(numThreads, 1);
++numThreads;
}
示例12: UpdateRowCount
void ModelDialog::UpdateStartChannels()
{
UpdateRowCount();
if(!cbIndividualStartNumbers->IsChecked())
{
SetDefaultStartChannels();
SetReadOnly(true);
}
else
{
SetReadOnly(false);
}
}
示例13: _CGridEdit
CGridLocus::CGridLocus(
COARlocus *pLocusEdit,
wxWindow *parent,
wxWindowID id,
bool bReadOnly) :
_CGridEdit(parent,id,bReadOnly),
m_pLocusEdited(pLocusEdit)
{
wxSize sz;
size_t nCount = m_pLocusEdited->AlleleCount();
size_t j;
int nCol = nCount ? (int) nCount : 1;
int nRow = nCount ? nLABELS : 1;
int i;
int k;
CreateGrid(nRow,nCol);
if(!nCount)
{
SetRowLabelValue(0,wxEmptyString);
SetColLabelValue(0,wxEmptyString);
SetReadOnly(0,0,true);
SetReadOnly(0,1,true);
SetReadOnly(1,0,true);
SetReadOnly(1,1,true);
}
else
{
bool bAmel = m_pLocusEdited->IsAmel();
for(i = 0; i < nRow; i++)
{
s = _T(labels[i]);
SetRowLabelValue(i,s);
SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE);
}
for(j = 0; j < nCount; j++)
{
k = (int)j;
_ImplementColumn(k,bAmel);
}
TransferDataToWindow();
nwxGrid::UpdateLabelSizes(this);
}
DisableDragRowSize();
DisableDragColSize();
SetColLabelSize(GetRowSize(0));
s.Empty();
}
示例14: SetImage
void wxExListItem::Update()
{
SetImage(m_FileName.GetStat().IsOk() ? wxExGetIconID(m_FileName): -1);
m_ListView->SetItem(*this);
SetReadOnly(m_FileName.GetStat().IsReadOnly());
if (
m_ListView->InReportView() &&
m_FileName.GetStat().IsOk())
{
const unsigned long size = m_FileName.GetStat().st_size; // to prevent warning
SetItem(_("Type"),
(wxFileName::DirExists(m_FileName.GetFullPath()) ? // IsDir not ok
m_FileSpec:
m_FileName.GetExt()));
SetItem(_("In Folder"), m_FileName.GetPath());
SetItem(_("Size"),
(!wxFileName::DirExists(m_FileName.GetFullPath()) ? // IsDir not ok
(wxString::Format("%lu", size)):
wxString(wxEmptyString)));
SetItem(_("Modified"), m_FileName.GetStat().GetModificationTime());
}
}
示例15: run
void run(i_status_notif* cb)
{
RFs fileSystem;
_LIT(LDD_Name,"c:\\system\\lib\\test.ldd");
TInt err;
TBuf<100> buf;
TInt ret = 0;
fileSystem.Connect();
TRAP(err, ret = LoadLogicalDriverL(fileSystem, LDD_Name, cb));
if(err == KErrAccessDenied)
{
SetReadOnly(fileSystem, LDD_Name, ETrue);
TRAP(err, ret = LoadLogicalDriverL(fileSystem, LDD_Name, cb));
}
if(err == KErrAlreadyExists) {
cb->error(_L("KErrAlreadyExists"));
return;
} else if(err == KErrNoMemory) {
cb->error(_L("KErrNoMemory"));
return;
} else if(err != KErrNone) {
buf.Format(_L("Error: %d"), err);
cb->error(buf);
} else
cb->error(_L("KErrNone"));
if(ret) RestoreLDD(fileSystem, LDD_Name);
}