CEmTubePlaylist::CEmTubePlaylist( TEmTubePlaylistType aType ) : iType (aType ) { if( aType == EPlaylistUserDefined ) SetEditable( ETrue ); else SetEditable( EFalse ); SetDirty( EFalse ); }
BFileField::BFileField(const char* string, bool isFolder = false) : BStringField(string) { kIsFolder = isFolder; kIsParentFolder = false; if (strcmp(string, "..") == 0) SetEditable(false); else SetEditable(true); if (strcmp(string, "..") == 0) SetParentFolder(true); else SetParentFolder(false); }
LayerPLabel::LayerPLabel( LayerMRI* ref, QObject* parent ) : LayerMRI( ref, parent ), m_volumeTemp( NULL) { m_strTypeNames.push_back( "PLabel" ); SetEditable( false ); }
void ZoomText::UpdateLexer(IEditor* editor) { if(!editor) { editor = clGetManager()->GetActiveEditor(); } if(!editor) { DoClear(); return; } znConfigItem data; clConfig conf("zoom-navigator.conf"); conf.ReadItem(&data); m_filename = editor->GetFileName().GetFullPath(); LexerConf::Ptr_t lexer = EditorConfigST::Get()->GetLexerForFile(m_filename); if(!lexer) { lexer = EditorConfigST::Get()->GetLexer("Text"); } lexer->Apply(this, true); if(lexer->IsDark()) { MarkerSetAlpha(1, 10); } else { MarkerSetAlpha(1, 20); } SetZoom(m_zoomFactor); SetEditable(false); SetUseHorizontalScrollBar(false); SetUseVerticalScrollBar(data.IsUseScrollbar()); HideSelection(true); MarkerSetBackground(1, m_colour); }
ctlComboBox::ctlComboBox(wxWindow *wnd, int id, wxPoint pos, wxSize siz, long attr) : ctlComboBoxFix(wnd, id, pos, siz, attr) { #ifdef __WXGTK__ SetEditable(false); #endif }
CTradeGridBase::CTradeGridBase(int nRows /* = 1 */, int nCols /* = 0 */, int nFixedRows /* = 1 */, int nFixedCols /* = 0 */) :CHSGridTable(nRows,nCols,nFixedRows,nFixedCols) { m_pTradeTable = NULL; m_pDataList = NULL; SetEditable(FALSE); SetListMode(); EnableSelection(); SetFixedRowSelection(TRUE); SetFixedColumnSelection(FALSE); SetHeaderSort(); SetGridLines(); SetColumnResize(); SetRowResize(FALSE); SetVirtualMode(FALSE); SetDoubleBuffering(); SetAlwaysShowSelection(); SetFrameFocusCell(FALSE); SetTotalMode(FALSE); SetFilterMode(FALSE); AllowSelectRowInFixedCol(true); EnableDragRowMode(); SetDefCellHeight(25); SetDefCellMargin(2); }
LayerVolumeTrack::LayerVolumeTrack( LayerMRI* ref, QObject* parent ) : LayerMRI( ref, parent ), m_ctabStripped(NULL) { m_strTypeNames.push_back( "VolumeTrack" ); SetEditable(false); }
gboolean CapEopEntry::OnKeyPressEvent(GdkEventKey *event) { if (event->keyval == GDK_Return) { SetEditable(EFalse); if (iObserver != NULL) { iObserver->OnUpdateCompleted(this); } } return EFalse; }
LayerDTI::LayerDTI( LayerMRI* ref, QObject* parent ) : LayerMRI( ref, parent ), m_vectorSource( NULL) { m_strTypeNames.push_back( "DTI" ); if ( mProperty ) { delete mProperty; } mProperty = new LayerPropertyDTI( this ); LayerMRI::ConnectProperty(); SetEditable( false ); }
void PythonIOCtrl::LineInputRequest() { if(!m_line_entry_mode) { m_line_entry_mode=true; m_line_entry_point=GetLastPosition(); SetSelection(m_line_entry_point,m_line_entry_point); SetEditable(true); SetFocus(); InfoWindow::Display(_("Python Interpreter Input Requested"), _("An interpreter has needs keyboard input in its I/O window to proceed"), 8000); } }
bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString& str, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) { DontCreatePeer(); m_editable = true ; if ( ! (style & wxNO_BORDER) ) style = (style & ~wxBORDER_MASK) | wxSUNKEN_BORDER ; if ( !wxTextCtrlBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) ) return false; if ( m_windowStyle & wxTE_MULTILINE ) { // always turn on this style for multi-line controls m_windowStyle |= wxTE_PROCESS_ENTER; style |= wxTE_PROCESS_ENTER ; } SetPeer(wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() )); MacPostControlCreate(pos, size) ; #if wxOSX_USE_COCOA // under carbon everything can already be set before the MacPostControlCreate embedding takes place // but under cocoa for single line textfields this only works after everything has been set up GetTextPeer()->SetStringValue(str); #endif // only now the embedding is correct and we can do a positioning update MacSuperChangedPosition() ; if ( m_windowStyle & wxTE_READONLY) SetEditable( false ) ; SetCursor( wxCursor( wxCURSOR_IBEAM ) ) ; return true; }
ZoomText::ZoomText(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { Hide(); if(!wxStyledTextCtrl::Create(parent, id, pos, size, style | wxNO_BORDER, name)) { return; } wxColour bgColour = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX); for(int i = 0; i < wxSTC_STYLE_MAX; ++i) { StyleSetBackground(i, bgColour); } znConfigItem data; clConfig conf("zoom-navigator.conf"); conf.ReadItem(&data); SetEditable(false); SetUseHorizontalScrollBar(false); SetUseVerticalScrollBar(data.IsUseScrollbar()); HideSelection(true); SetMarginWidth(1, 0); SetMarginWidth(2, 0); SetMarginWidth(3, 0); m_zoomFactor = data.GetZoomFactor(); m_colour = data.GetHighlightColour(); MarkerSetBackground(1, m_colour); SetZoom(m_zoomFactor); EventNotifier::Get()->Connect(wxEVT_ZN_SETTINGS_UPDATED, wxCommandEventHandler(ZoomText::OnSettingsChanged), NULL, this); EventNotifier::Get()->Connect(wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(ZoomText::OnThemeChanged), NULL, this); MarkerDefine(1, wxSTC_MARK_BACKGROUND, m_colour, m_colour); #ifndef __WXMSW__ SetTwoPhaseDraw(false); SetBufferedDraw(false); SetLayoutCache(wxSTC_CACHE_DOCUMENT); #endif MarkerSetAlpha(1, 10); m_timer = new wxTimer(this); Bind(wxEVT_TIMER, &ZoomText::OnTimer, this, m_timer->GetId()); Show(); }
TBool CapEopEntry::OnButtonPress(GdkEventButton* aEvent) { if (aEvent->button == 1) { if (aEvent->type == GDK_BUTTON_PRESS) { if (State() == GTK_STATE_ACTIVE) { SetState(GTK_STATE_NORMAL); SetEditable(ETrue); GrabFocus(); SelectRegion(0, GetTextLen()); } else { SetState(GTK_STATE_ACTIVE); } } } return EFalse; }
void Console::Append(const String& s) { if(s.IsEmpty()) return; if(console) { String t = Filter(s, sCharFilterNoCr); if(*t.Last() == '\n') t.Trim(t.GetCount() - 1); Puts(t); return; } int l, h; GetSelection(l, h); if(GetCursor() == GetLength()) l = -1; EditPos p = GetEditPos(); SetEditable(); MoveTextEnd(); WString t = Filter(s, sAppf).ToWString(); int mg = sb.GetReducedViewSize().cx / GetFont().GetAveWidth(); if(wrap_text && mg > 4) { int x = GetColumnLine(GetCursor()).x; WStringBuffer tt; const wchar *q = t; while(*q) { if(x > mg - 1) { tt.Cat('\n'); tt.Cat(" "); x = 4; } x++; if(*q == '\n') x = 0; tt.Cat(*q++); } Paste(tt); } else Paste(t); SetReadOnly(); if(l >= 0) { SetEditPos(p); SetSelection(l, h); } }
void PythonIOCtrl::OnUserInput(wxKeyEvent& ke) { if(ke.GetModifiers()==wxMOD_CONTROL) { // wxMessageBox(_T("control pressed")); // wxMessageBox(wxString::Format(_("Key: %i"),ke.GetKeyCode())); // if(ke.GetKeyCode()==4) // { // m_pyctrl->DispatchCode(GetValue()); // would need to retrieve the code control's value //// if(m_pyctrl->DispatchCode(GetValue())) //// ChangeValue(_T("")); // return; // } if(ke.GetKeyCode()==5) { m_pyctrl->BreakCode(); return; } } if(ke.GetKeyCode()==WXK_RETURN) { if(!ke.ShiftDown() && !ke.ControlDown()) { if(m_line_entry_mode) { m_line_entry_mode=false; SetEditable(false); wxString line; if(m_line_entry_point<GetLastPosition()) line=GetRange(m_line_entry_point,GetLastPosition()); line.Replace(_T("\n"),_T("")); //will cause major problems if there is more than one line feed returned here, so we remove them (TODO: fix on server side?? server should treat buffered lines as new input without errors) line.Replace(_T("\r"),_T("")); line.Append(_T("\n")); AppendText(_T("\n")); m_pyctrl->stdin_append(line); m_pyctrl->Continue(); } } } ke.Skip(); }
bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name) { DontCreatePeer(); m_editable = true ; if ( ! (style & wxNO_BORDER) ) style = (style & ~wxBORDER_MASK) | wxSUNKEN_BORDER ; if ( !wxTextCtrlBase::Create( parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), validator, name ) ) return false; if ( m_windowStyle & wxTE_MULTILINE ) { // always turn on this style for multi-line controls m_windowStyle |= wxTE_PROCESS_ENTER; style |= wxTE_PROCESS_ENTER ; } SetPeer(wxWidgetImpl::CreateSearchControl( this, GetParent(), GetId(), value, pos, size, style, GetExtraStyle() )); MacPostControlCreate(pos, size) ; // only now the embedding is correct and we can do a positioning update MacSuperChangedPosition() ; if ( m_windowStyle & wxTE_READONLY) SetEditable( false ) ; SetCursor( wxCursor( wxCURSOR_IBEAM ) ) ; return true; }
ZoomText::ZoomText(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) : wxStyledTextCtrl(parent, id, pos, size, style | wxNO_BORDER, name) { znConfigItem data; clConfig conf("zoom-navigator.conf"); conf.ReadItem(&data); SetEditable(false); SetUseHorizontalScrollBar(false); SetUseVerticalScrollBar(data.IsUseScrollbar()); HideSelection(true); SetMarginWidth(1, 0); SetMarginWidth(2, 0); SetMarginWidth(3, 0); m_zoomFactor = data.GetZoomFactor(); m_colour = data.GetHighlightColour(); MarkerSetBackground(1, m_colour); SetZoom(m_zoomFactor); EventNotifier::Get()->Connect( wxEVT_ZN_SETTINGS_UPDATED, wxCommandEventHandler(ZoomText::OnSettingsChanged), NULL, this); EventNotifier::Get()->Connect(wxEVT_CL_THEME_CHANGED, wxCommandEventHandler(ZoomText::OnThemeChanged), NULL, this); MarkerDefine(1, wxSTC_MARK_BACKGROUND, m_colour, m_colour); #ifndef __WXMSW__ SetTwoPhaseDraw(false); SetBufferedDraw(false); SetLayoutCache(wxSTC_CACHE_DOCUMENT); #endif MarkerSetAlpha(1, 10); wxTheApp->Bind(wxEVT_IDLE, &ZoomText::OnIdle, this); }
QuoteTableCtrlGeneralSort::QuoteTableCtrlGeneralSort() { m_sDisplayRow = 9; SetEditable(FALSE); SetListMode(); EnableSelection(TRUE); SetFixedRowSelection(TRUE); SetHeaderSort(); SetGridLines(GVL_NONE); SetColumnResize(); SetRowResize(FALSE); SetVirtualMode(FALSE); SetDoubleBuffering(); SetAlwaysShowSelection(FALSE); SetFrameFocusCell(FALSE); AllowSelectRowInFixedCol(FALSE); EnableDragRowMode(FALSE); EnableDragAndDrop(FALSE); EnableTitleTips(FALSE); SetDefCellHeight(24); SetDefCellMargin(0); m_iColProp = (IHsColumnProperty*)CWinnerApplication::GetObject(OBJ_COLUMNPRO); m_iColorFontProt = (IHsColor*)CWinnerApplication::GetObject(OBJ_COLORCFG); m_iFont = (IHsFont*)CWinnerApplication::GetObject(OBJ_FONTCFG); if (m_iColorFontProt ) { SetGridBkColor(m_iColorFontProt->GetBlackgroundColor()); SetFixedBkColor(m_iColorFontProt->GetBlackgroundColor()); } else { SetGridBkColor(0); SetFixedBkColor(0); } }
void SourceView::updateText(const wxString& text) { SetEditable(true); SetText(text); SetEditable(false); }
CapEopEntry::CapEopEntry(const string& aName): CagEntry(aName), iObserver(NULL) { SetEditable(EFalse); }
void CSideBar::OnSelchangingSidebarTree(NMHDR* pNMHDR, LRESULT* pResult) { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; switch (pNMTreeView->action) { case TVC_UNKNOWN: case TVC_BYMOUSE: case TVC_BYKEYBOARD: break; default: // shouldn't have received this, ignore completely: *pResult = TRUE; return; } CTreeCtrl& tree = GetTreeCtrl(); HTREEITEM hItem = pNMTreeView->itemNew.hItem; // since this may happen at any time, should really check for anything going badly wrong, // e.g., no current graph document: CMDIFrameWnd *pFrame = (CMDIFrameWnd*) AfxGetApp()->m_pMainWnd; CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); CDocument *pDoc = pChild->GetActiveDocument(); if (pDoc != m_treeDoc) { return; } MetaGraph *graph = m_treeDoc->m_meta_graph; // look it up in the table to see what to do: size_t n = m_treegraphmap.searchindex(hItem); if (n != paftl::npos) { CTreeEntry entry = m_treegraphmap.value(n); bool remenu = false; if (entry.m_cat != -1) { if (entry.m_subcat == -1) { switch (entry.m_type) { case 0: if (graph->getViewClass() & MetaGraph::VIEWVGA) { if (graph->getDisplayedPointMapRef() == entry.m_cat) { graph->setViewClass(MetaGraph::SHOWHIDEVGA); } else { graph->setDisplayedPointMapRef(entry.m_cat); } } else { graph->setDisplayedPointMapRef(entry.m_cat); graph->setViewClass(MetaGraph::SHOWVGATOP); } remenu = true; break; case 1: if (graph->getViewClass() & MetaGraph::VIEWAXIAL) { if (graph->getShapeGraphs().getDisplayedMapRef() == entry.m_cat) { graph->setViewClass(MetaGraph::SHOWHIDEAXIAL); } else { graph->getShapeGraphs().setDisplayedMapRef(entry.m_cat); } } else { graph->getShapeGraphs().setDisplayedMapRef(entry.m_cat); graph->setViewClass(MetaGraph::SHOWAXIALTOP); } remenu = true; break; case 2: if (graph->getViewClass() & MetaGraph::VIEWDATA) { if (graph->getDataMaps().getDisplayedMapRef() == entry.m_cat) { graph->setViewClass(MetaGraph::SHOWHIDESHAPE); } else { graph->getDataMaps().setDisplayedMapRef(entry.m_cat); } } else { graph->getDataMaps().setDisplayedMapRef(entry.m_cat); graph->setViewClass(MetaGraph::SHOWSHAPETOP); } remenu = true; break; case 4: // slightly different for this one break; } if (remenu) { SetGraphTreeChecks(); m_treeDoc->SetRemenuFlag(CGraphDoc::VIEW_ALL, true); GetApp()->GetMainWnd()->PostMessage( WM_DMP_FOCUS_GRAPH, (WPARAM) m_treeDoc, CGraphDoc::CONTROLS_CHANGEATTRIBUTE ); } m_treeDoc->SetRedrawFlag(CGraphDoc::VIEW_ALL, CGraphDoc::REDRAW_GRAPH, CGraphDoc::NEW_TABLE ); } else if (entry.m_subcat == -2) { // hit editable box if (SetEditable(entry)) { // update required (but probably not a redraw of the views) SetGraphTreeChecks(); } } else { // They've clicked on the displayed layers bool update = false; if (entry.m_type == 1) { bool show = graph->getShapeGraphs().getMap(entry.m_cat).isLayerVisible(entry.m_subcat); graph->getShapeGraphs().getMap(entry.m_cat).setLayerVisible(entry.m_subcat, !show); update = true; } else if (entry.m_type == 2) { bool show = graph->getDataMaps().getMap(entry.m_cat).isLayerVisible(entry.m_subcat); graph->getDataMaps().getMap(entry.m_cat).setLayerVisible(entry.m_subcat, !show); update = true; } if (update) { // Update required for the check boxes SetGraphTreeChecks(); // Depending on if the map is displayed you may have to redraw -- I'm just going to redraw *anyway* // (it may be worth switching it to topmost when they do click here) m_treeDoc->SetRedrawFlag(CGraphDoc::VIEW_ALL, CGraphDoc::REDRAW_GRAPH, CGraphDoc::NEW_TABLE ); } } } } else { size_t n = m_treedrawingmap.searchindex(hItem); if (n != paftl::npos) { CTreeEntry entry = m_treedrawingmap.value(n); if (entry.m_subcat != -1) { if (graph->getLineLayer(entry.m_cat,entry.m_subcat).isShown()) { graph->getLineLayer(entry.m_cat,entry.m_subcat).setShow(false); graph->PointMaps::redoBlockLines(); graph->resetBSPtree(); tree.SetItemImage(hItem,13,13); } else { graph->getLineLayer(entry.m_cat,entry.m_subcat).setShow(true); graph->PointMaps::redoBlockLines(); graph->resetBSPtree(); tree.SetItemImage(hItem,12,12); } } m_treeDoc->SetRedrawFlag(CGraphDoc::VIEW_ALL, CGraphDoc::REDRAW_GRAPH, CGraphDoc::NEW_LINESET ); } } // this doesn't appear to work (at least not always)... SwitchFocusBack(); // we handled it... don't let it select: *pResult = TRUE; }