本文整理汇总了C++中GetEditor函数的典型用法代码示例。如果您正苦于以下问题:C++ GetEditor函数的具体用法?C++ GetEditor怎么用?C++ GetEditor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetEditor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEditor
void CObjectSelectTool::EndTool()
{
// TODO: 在此添加控件通知处理程序代码
if ( mSelectionBuffer )
{
delete mSelectionBuffer;
mSelectionBuffer = NULL;
}
GetEditor()->unRegisterEditorListener( this );
if(mLastSelectedEntity)
mLastSelectedEntity->getParentSceneNode()->showBoundingBox(false);
if ( m_iCurrentPageId )
{
m_pObjectCtrl->RemovePage(m_iCurrentPageId);
}
mAxisGizmo.DestroyGizmo();
}
示例2: GetEditor
void PreciseScaleCmd::Execute () {
float x = 0.0, y = 0.0;
Editor* ed = GetEditor();
if (_dialog == nil) {
_dialog = new ScaleDialog();
}
ed->InsertDialog(_dialog);
bool accepted = _dialog->Accept();
ed->RemoveDialog(_dialog);
if (accepted) {
_dialog->GetValues(x, y);
if (x != 0.0 && y != 0.0) {
ScaleCmd* scaleCmd = new ScaleCmd(ed, x, y);
scaleCmd->Execute();
scaleCmd->Log();
}
}
}
示例3: wxUnusedVar
//------------------------------------------------------------
void SnipWiz::OnMenuPaste(wxCommandEvent& e)
{
wxUnusedVar(e);
IEditor* editor = GetEditor();
if(!editor) return;
if(m_clipboard.IsEmpty()) return;
// otherwise insert text
wxString output = FormatOutput(editor, m_clipboard);
wxString selection = editor->GetSelection();
int curPos = editor->GetCurrentPosition() - selection.Len();
// get caret position
long cursorPos = output.Find(REAL_CARET_STR);
if(cursorPos != wxNOT_FOUND) output.Remove(cursorPos, wxStrlen(REAL_CARET_STR));
editor->ReplaceSelection(output);
// set caret
if(cursorPos != wxNOT_FOUND)
editor->SetCaretAt(curPos + cursorPos);
else
editor->SetCaretAt(curPos + output.Len());
}
示例4: GetPageCount
void wxSTEditorNotebook::UpdateItems(wxMenu *menu, wxMenuBar *menuBar, wxToolBar *toolBar)
{
if (!menu && !menuBar && !toolBar) return;
bool has_pages = GetPageCount() > 0;
bool can_save_all = CanSaveAll();
bool editor_page = GetEditor() != NULL;
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_SAVE_ALL, can_save_all);
if (menu)
{
wxMenuItem *gotoMenuItem = menu->FindItem(ID_STN_MENU_GOTO);
if (gotoMenuItem)
UpdateGotoCloseMenu(gotoMenuItem->GetSubMenu(), ID_STN_GOTO_PAGE_START);
wxMenuItem *closeMenuItem = menu->FindItem(ID_STN_MENU_CLOSE);
if (closeMenuItem)
UpdateGotoCloseMenu(closeMenuItem->GetSubMenu(), ID_STN_CLOSE_PAGE_START);
}
if (menuBar)
{
wxMenuItem *gotoMenuItem = menuBar->FindItem(ID_STN_MENU_GOTO);
if (gotoMenuItem)
UpdateGotoCloseMenu(gotoMenuItem->GetSubMenu(), ID_STN_GOTO_PAGE_START);
wxMenuItem *closeMenuItem = menuBar->FindItem(ID_STN_MENU_CLOSE);
if (closeMenuItem)
UpdateGotoCloseMenu(closeMenuItem->GetSubMenu(), ID_STN_CLOSE_PAGE_START);
}
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_WIN_PREVIOUS, has_pages); // && (GetSelection() > 0));
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_WIN_NEXT, has_pages); // && (GetSelection()+1 < (int)GetPageCount()));
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_MENU_GOTO, has_pages);
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_CLOSE_PAGE, editor_page);
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_CLOSE_ALL, has_pages);
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_CLOSE_ALL_OTHERS, has_pages);
STE_MM::DoEnableItem(menu, menuBar, toolBar, ID_STN_MENU_CLOSE, has_pages);
}
示例5: GetEditor
void NewCompCmd::Execute () {
Editor* ed = GetEditor();
Component* orig = ed->GetComponent();
Component* comp = prototype_->Copy();
CompNameVar* compNameVar = (CompNameVar*) ed->GetState("CompNameVar");
ModifStatusVar* modifVar = (ModifStatusVar*)ed->GetState("ModifStatusVar");
if (OnlyOneEditorOf(orig) && !ReadyToClose(ed)) {
return;
}
if (compNameVar != nil) compNameVar->SetComponent(comp);
if (modifVar != nil) modifVar->SetComponent(comp);
ed->SetComponent(comp);
ed->Update();
if (orig != nil && unidraw->FindAny(orig) == nil) {
Component* root = orig->GetRoot();
delete root;
}
}
示例6: editor_renz_shutdown
void editor_renz_shutdown(Tcl_Interp *interp, editor_result *result, int seq_num){
EDITOR_RECORD *er;
ed_renz_res *data = result->data;
out_canvas_e *output = result->output;
char cmd[1024];
int ed_id, seq_id;
/* need to deregister sequence */
editor_deregister(seq_num, ed_renz_callback, (editor_result *)result);
ed_delete_cursor(seq_num, output->cursor->id, 0);
seq_id = GetEdenId (seq_num);
ed_id = GetEdIdFromSeqId (seq_id);
er = GetEditor (ed_id);
er->graphical = 0;
if (er->text == 0) {
delete_editor (ed_id);
}
sprintf(cmd, "DeleteREnzPlot %s %s\n", data->frame, data->re_win);
if (TCL_ERROR == Tcl_Eval(interp, cmd)) {
verror(ERR_WARN, "restriction enzymes", "shutdown %s\n",
interp->result);
}
ed_renz_shutdown(data->r_enzyme, data->num_enzymes, data->match,
data->canvas, data->world, data->zoom);
free(data->text_colour);
free(data->tick->colour);
free(data->cursor.colour);
free(data->ruler->tick.t.colour);
free(data->ruler->colour);
xfree(result->data);
/* xfree(result->input); */
xfree(result->output);
xfree(result);
}
示例7: GetEditor
void EntityEx::Create( const String& entityName, const String& meshName, const String& mtlName )
{
mpSceneMgr = GetEditor()->GetSceneManager();
// create main model
msEntityName = entityName;
mpSceneNode = mpSceneMgr->getRootSceneNode()->createChildSceneNode();
mpEntity = mpSceneMgr->createEntity( msEntityName, meshName );
mpEntity->setUserAny( Ogre::Any(this) );
mbVisible = false;
mpTipNode = static_cast<SceneNode*>(mpSceneNode->createChild());
msBillboardName = entityName + "bbinfo";
mpTipBoard = mpSceneMgr->createBillboardSet(msBillboardName);
Billboard* pTip = mpTipBoard->createBillboard(Vector3(0, 50, 0));
pTip->setDimensions( 20.0f, 20.0f );
if ( mtlName != "NULL" )
{
mpEntity->setMaterialName(mtlName);
mpTipBoard->setMaterialName(mtlName);
}
}
示例8: GetEditor
void PreciseMoveCmd::Execute () {
float dx = 0.0, dy = 0.0;
Editor* ed = GetEditor();
if (_dialog == nil) {
_dialog = new MoveDialog();
}
ed->InsertDialog(_dialog);
boolean accepted = _dialog->Accept();
ed->RemoveDialog(_dialog);
if (accepted) {
_dialog->GetValues(dx, dy);
if (dx != 0.0 || dy != 0.0) {
MoveCmd* moveCmd = new MoveCmd(ed, dx, dy);
moveCmd->Execute();
moveCmd->Log();
}
}
}
示例9: GetEditor
void CommandDrawHeightmap::Execute()
{
LandscapeEditorHeightmap* editor = GetEditor();
if (editor == NULL)
{
SetState(STATE_INVALID);
return;
}
Heightmap* heightmap;
editor->GetHeightmap(&heightmap);
if (redoFilename == "")
{
redoFilename = SaveHeightmap(heightmap, "_" + GetRandomString(10));
}
else
{
heightmap->Load(redoFilename);
editor->UpdateHeightmap(heightmap);
}
}
示例10: GetEditor
void wxSTEditorFrame::OnNotebookPageChanged(wxNotebookEvent &WXUNUSED(event))
{
wxSTEditor *editor = GetEditor();
wxString title;
wxSTEditorMenuManager *steMM = GetOptions().GetMenuManager();
if (editor)
{
title = MakeTitle(editor);
if ( steMM && !steMM->HasEnabledEditorItems())
steMM->EnableEditorItems(true, NULL, GetMenuBar(), GetToolBar());
}
else
{
title = m_titleBase;
if (steMM && steMM->HasEnabledEditorItems())
steMM->EnableEditorItems(false, NULL, GetMenuBar(), GetToolBar());
}
SetTitle(title);
}
示例11: GetEditor
// ------------------------------------------------------------
void SpellCheck::OnCheck(wxCommandEvent& e)
{
IEditor* editor = GetEditor();
if(!editor) return;
wxString text = editor->GetEditorText();
text += wxT(" "); // prevents indicator flickering at end of file
if(m_pEngine != NULL) {
if(GetCheckContinuous()) // switch continuous search off if running
SetCheckContinuous(false);
// if we don't have a dictionary yet, open settings
if(!m_pEngine->GetDictionary()) {
OnSettings(e);
return;
}
switch(editor->GetLexerId()) {
case 3: { // wxSCI_LEX_CPP
if(m_mgr->IsWorkspaceOpen()) {
m_pEngine->CheckCppSpelling(text);
if(!m_checkContinuous) {
editor->ClearUserIndicators();
}
}
} break;
case 1: { // wxSCI_LEX_NULL
m_pEngine->CheckSpelling(text);
if(!m_checkContinuous) {
editor->ClearUserIndicators();
}
} break;
}
}
}
示例12: GetClipboard
void GroupCmd::Execute () {
Clipboard* cb = GetClipboard();
if (cb == nil) {
SetClipboard(cb = new Clipboard);
Editor* ed = GetEditor();
Selection* s = ed->GetSelection();
if (s->Number() > 1) {
Iterator i;
GraphicView* views = ed->GetViewer()->GetGraphicView();
s->Sort(views);
for (s->First(i); !s->Done(i); s->Next(i)) {
s->GetView(i)->Interpret(this);
}
}
} else {
Clipboard* oldcb = cb;
SetClipboard(cb = new Clipboard);
Iterator i;
for (oldcb->First(i); !oldcb->Done(i); oldcb->Next(i)) {
oldcb->GetComp(i)->Interpret(this);
}
delete oldcb;
}
if (!cb->IsEmpty()) {
if (_group == nil) {
SetGroup(new GraphicComps);
}
_group->Interpret(this);
_executed = true;
}
}
示例13: switch
void CNpcTestTool::OnMouseMove(UINT nFlags, CPoint point)
{
switch (mState)
{
case E_NPC_BORN:
{
Ogre::TerrainGroup::RayResult rayResult = GetEditor()->TerrainHitTest( point );
if (rayResult.hit)
{
mpNpc->setPosition(rayResult.position);
}
}
break;
case E_NPC_IDLE:
{
//Ogre::TerrainGroup::RayResult rayResult = GetEditor()->TerrainHitTest( point );
//if (rayResult.hit)
//{
// mpNpc->setGoalDirection(rayResult.position);
//}
}
break;
}
}
示例14: GetEditor
void CRenderDialog::OnRButtonUp(UINT nFlags, CPoint point)
{
GetEditor()->OnRButtonUp(nFlags,point);
CDialog::OnRButtonUp(nFlags, point);
}
示例15: GetEditor
HTMLTextAreaElement::GetTextEditor()
{
return GetEditor();
}