当前位置: 首页>>代码示例>>C++>>正文


C++ SetReadOnly函数代码示例

本文整理汇总了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();
}
开发者ID:burzumishi,项目名称:arnold,代码行数:32,代码来源:edit.cpp

示例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;
}
开发者ID:raimoj,项目名称:pawnshop,代码行数:29,代码来源:RGXEvents.cpp

示例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);
}
开发者ID:samuelxu91,项目名称:catheter_arduino_controller,代码行数:8,代码来源:catheter_grid.cpp

示例4: SetReadOnly

void ZoomText::DoClear()
{
    m_classes.clear();
    m_locals.clear();
    SetReadOnly(false);
    SetText("");
    SetReadOnly(true);
}
开发者ID:eranif,项目名称:codelite,代码行数:8,代码来源:zoomtext.cpp

示例5: GetReadOnly

/*---------------------------------------------------------------------------*/
void wxDDLEditor::SetValue(const wxString& value)
{
   bool ro = GetReadOnly();

   SetReadOnly(false);
   SetText(value);
   SetReadOnly(ro);
}
开发者ID:eriser,项目名称:wxsqlite3,代码行数:9,代码来源:sqleditor.cpp

示例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();
}
开发者ID:thibugio,项目名称:svsm-catheter_gui,代码行数:8,代码来源:CatheterCmdGrid.cpp

示例7: SetReadOnly

void OutputCtrl::Clear()
{
   SetReadOnly( false );
   ClearAll();
   SetReadOnly( true );
   m_Selected = -1;

   ClearErrors();
}
开发者ID:Duion,项目名称:Torsion,代码行数:9,代码来源:OutputCtrl.cpp

示例8: SetReadOnly

void CRGXDeskLogRows::clear()
{
	SetReadOnly(FALSE);
	SetTopRow(1);
	MoveCurrentCell(GX_TOPLEFT);
	SetRowCount(0);
	Redraw();
	SetReadOnly(TRUE);
}
开发者ID:raimoj,项目名称:pawnshop,代码行数:9,代码来源:RGXDeskLogRows.cpp

示例9: DoClear

void ZoomText::UpdateText(IEditor* editor)
{
    if(!editor) {
        DoClear();

    } else {
        SetReadOnly(false);
        SetText(editor->GetEditorText());
        SetReadOnly(true);
        SetCurrentPos(editor->GetCurrentPosition());
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:12,代码来源:zoomtext.cpp

示例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();

}
开发者ID:yjdwbj,项目名称:cb10-05-ide,代码行数:53,代码来源:disassemblytextctrl.cpp

示例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;
}
开发者ID:ppettersson,项目名称:ManaShell,代码行数:12,代码来源:Threads.cpp

示例12: UpdateRowCount

void ModelDialog::UpdateStartChannels()
{
    UpdateRowCount();

    if(!cbIndividualStartNumbers->IsChecked())
    {
        SetDefaultStartChannels();
        SetReadOnly(true);
    }
    else
    {
        SetReadOnly(false);
    }

}
开发者ID:SteveGase,项目名称:xLights,代码行数:15,代码来源:ModelDialog.cpp

示例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();
}
开发者ID:Klortho,项目名称:osiris,代码行数:48,代码来源:CGridLocus.cpp

示例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());
  }
}
开发者ID:hfvw,项目名称:wxExtension,代码行数:26,代码来源:listitem.cpp

示例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);
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:29,代码来源:load.cpp


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