Esempio n. 1
0
CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString &tip, size_t numOfTips, bool simpleTip)
    : wxPopupWindow(parent)
    , m_tip(tip)
{
    while ( m_tip.Replace("\n\n", "\n") ) {}
    DoInitialize(m_tip, numOfTips, simpleTip);
}
Esempio n. 2
0
NewThemeDialog::NewThemeDialog(wxWindow* parent, LexerConf::Ptr_t lexer)
    : NewThemeDialogBase(parent)
{
    Center();
    WindowAttrManager::Load(this, "NewThemeDialog");
    DoInitialize(lexer);
}
ZoomNavigator::ZoomNavigator(IManager* manager)
    : IPlugin(manager)
    , mgr(manager)
    , zoompane(NULL)
    , m_topWindow(NULL)
    , m_text(NULL)
    , m_markerFirstLine(wxNOT_FOUND)
    , m_markerLastLine(wxNOT_FOUND)
    , m_enabled(false)
    , m_lastLine(wxNOT_FOUND)
    , m_startupCompleted(false)
{
    m_config = new clConfig("zoom-navigator.conf");
    m_longName = _("Zoom Navigator");
    m_shortName = wxT("ZoomNavigator");
    m_topWindow = m_mgr->GetTheApp();

    m_topWindow->Connect(wxEVT_IDLE, wxIdleEventHandler(ZoomNavigator::OnIdle), NULL, this);
    EventNotifier::Get()->Connect(wxEVT_INIT_DONE, wxCommandEventHandler(ZoomNavigator::OnInitDone), NULL, this);
    EventNotifier::Get()->Connect(wxEVT_FILE_SAVED, clCommandEventHandler(ZoomNavigator::OnFileSaved), NULL, this);
    EventNotifier::Get()->Connect(
        wxEVT_ZN_SETTINGS_UPDATED, wxCommandEventHandler(ZoomNavigator::OnSettingsChanged), NULL, this);
    m_topWindow->Connect(XRCID("zn_settings"),
                         wxEVT_COMMAND_MENU_SELECTED,
                         wxCommandEventHandler(ZoomNavigator::OnSettings),
                         NULL,
                         this);
    EventNotifier::Get()->Bind(wxEVT_SHOW_WORKSPACE_TAB, &ZoomNavigator::OnToggleTab, this);
    DoInitialize();
}
Esempio n. 4
0
void NewThemeDialog::OnLexerSelected(wxCommandEvent& event)
{
    LexerConf::Ptr_t lexer = ColoursAndFontsManager::Get().GetLexer(m_choiceLanguage->GetStringSelection());
    if(lexer) {
        DoInitialize(lexer);
    }
}
OpenResourceDlg::OpenResourceDlg(wxWindow* parent, IManager* manager)
    : OpenResourceDlgBase(parent)
    , m_mgr(manager)
    , m_timer(NULL)
{
    wxStringSet_t files;
    PHPWorkspace::Get()->GetWorkspaceFiles(files);
    m_table.Open(PHPWorkspace::Get()->GetFilename().GetPath());
    m_allFiles.reserve(files.size());
    std::set<wxString>::iterator iter = files.begin();
    for(; iter != files.end(); iter++) {
        wxFileName fn((*iter));
        ResourceItem fileItem;
        fileItem.displayName = fn.GetFullName();
        fileItem.filename = fn;
        fileItem.line = -1;
        fileItem.type = ResourceItem::kRI_File;
        m_allFiles.push_back(fileItem);
    }

    DoInitialize();
    m_timer = new wxTimer(this, TIMER_ID);
    m_timer->Start(500, true);
    WindowAttrManager::Load(this, "PHPOpenResourceDlg", NULL);
}
Esempio n. 6
0
CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString& tip)
    : wxPopupWindow(parent)
    , m_tip(tip)
{
    while ( m_tip.Replace("\n\n", "\n") ) {}
    DoInitialize(m_tip, 1, true);
}
Esempio n. 7
0
CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString& tip, size_t numOfTips, bool simpleTip)
    : wxPopupWindow(parent)
    , m_tip(tip)
    , m_useLightColours(false)
{
    CCBoxTipWindow_ShrinkTip(m_tip);
    DoInitialize(m_tip, numOfTips, simpleTip);
}
Esempio n. 8
0
CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString& tip)
    : wxPopupWindow(parent)
    , m_tip(tip)
    , m_useLightColours(false)
{
    CCBoxTipWindow_ShrinkTip(m_tip);
    DoInitialize(m_tip, 1, true);
}
Esempio n. 9
0
void APower::Initialize(int32 UID)
{
  if (Cast<AMapState>(GetWorld()->GameState) == NULL && !IsInitialized) { return; }
  if (!Cast<AMapState>(GetWorld()->GameState)->PowersDB->CheckExists(UID)) { return; }
  if (Role < ROLE_Authority) {
    ServerInitialize(UID);
  } else {
    DoInitialize(UID);
  }
}
Esempio n. 10
0
OpenResourceDlg::OpenResourceDlg(wxWindow* parent, const ResourceVector_t& items, IManager* manager)
    : OpenResourceDlgBase(parent)
    , m_mgr(manager)
    , m_timer(NULL)
{
    m_resources = items;
    m_textCtrlFilter->Hide();
    m_staticText9->Hide();
    GetSizer()->Fit(this);

    DoInitialize();
    DoPopulateListCtrl(m_resources);
    WindowAttrManager::Load(this, "PHPOpenResourceDlg", NULL);
}
Esempio n. 11
0
void MCPrinter::Initialize(void)
{
    m_device_output_type = PRINTER_OUTPUT_DEVICE;
    m_device_output_location = NULL;
    m_device_command = NULL;
    m_device_font_table = NULL;
    m_device_features = 0;
    MCU_set_rect(m_device_rectangle, 0, 0, PRINTER_DEFAULT_PAGE_WIDTH, PRINTER_DEFAULT_PAGE_HEIGHT);

    m_page_width = PRINTER_DEFAULT_PAGE_WIDTH;
    m_page_height = PRINTER_DEFAULT_PAGE_HEIGHT;
    m_page_left_margin = 72;
    m_page_top_margin = 72;
    m_page_right_margin = 72;
    m_page_bottom_margin = 72;
    m_page_orientation = PRINTER_DEFAULT_PAGE_ORIENTATION;
    m_page_scale = 1.0;

    m_job_copies = PRINTER_DEFAULT_JOB_COPIES;
    m_job_collate = PRINTER_DEFAULT_JOB_COLLATE;
    m_job_name = NULL;
    m_job_duplex = PRINTER_DEFAULT_JOB_DUPLEX;
    m_job_color = PRINTER_DEFAULT_JOB_COLOR;
    m_job_range_count = PRINTER_PAGE_RANGE_ALL;
    m_job_ranges = NULL;

    m_layout_show_borders = false;
    m_layout_row_spacing = 36;
    m_layout_column_spacing = 36;
    m_layout_rows_first = true;
    m_layout_scale = 1.0;

    m_loop_nesting = 0;
    m_loop_layout_x = 0;
    m_loop_layout_y = 0;
    m_loop_layout_delta = 0;
    m_loop_error = NULL;
    m_loop_status = STATUS_READY;
    m_loop_page = 0;

    m_device = NULL;

    m_resync = true;

    DoInitialize();
}
Esempio n. 12
0
bool Entity::Initialize( Renderer* renderer ) throw(std::exception)
{
    bool r(true);
    bool sortChildred( false );
    while ( m_InitList.size() ) {
        auto& entity = m_InitList.front();
        entity->Initialize( renderer );
        // should be a sorted insert...but would probably slow the container (change to set/multiset??)
        m_RenderList.push_back(entity);
        m_InitList.pop_front();
        sortChildred = true;
    }
    if ( sortChildred ) {
        m_RenderList.sort( boost::bind( &Entity::CompareEntityPriorities, this, _1, _2) );
    }
    DoInitialize( renderer );
    return r;
}
Esempio n. 13
0
void ControlRenderer::Initialize( Actor& actor, const Property::Map& propertyMap )
{
  if( mImpl->mCustomShader )
  {
    mImpl->mCustomShader->SetPropertyMap( propertyMap );
  }
  else
  {
    Property::Value* customShaderValue = propertyMap.Find( CUSTOM_SHADER );
    if( customShaderValue )
    {
      Property::Map customShader;
      if( customShaderValue->Get( customShader ) )
      {
        mImpl->mCustomShader = new Impl::CustomShader( propertyMap );
      }
    }
  }
  DoInitialize( actor, propertyMap );
}
Esempio n. 14
0
Ptr<Texture> Filter::Apply(Ptr<Texture> input)
{
    Input = input;
    TotalTime = RenderTime = CompileTime = TimeSpan(0);
    assert(Input);
#ifdef PROFILING
    glFinish();
    auto t = now();
#endif
    DoLoadShaderPrograms();
    DoInitialize();
    auto output = PerformSteps();
#ifdef PROFILING
    TotalTime = now() - t;
    PrintProfilingInfo();
    RenderWindow::CompileTime += CompileTime;
    RenderWindow::RenderTime  += RenderTime;
#endif
    return output;
}
ImplementParentVirtualFunctionsDialog::ImplementParentVirtualFunctionsDialog( wxWindow* parent, const wxString &scopeName, const std::vector<TagEntryPtr> &tags, wxChar doxyPrefix, ContextCpp *contextCpp )
    : ImplementParentVirtualFunctionsBase(parent    )
    , m_tags                             (tags      )
    , m_doxyPrefix                       (doxyPrefix)
    , m_contextCpp                       (contextCpp)
    , m_scope                            (scopeName )
{
    unsigned int colCount = m_dataviewModel->GetColumnCount();
    m_dataviewModel = new ImplFuncModel();
    m_dataviewModel->SetColCount(colCount);
    m_dataview->AssociateModel( m_dataviewModel.get() );

    SetName("ImplementParentVirtualFunctionsDialog");
    WindowAttrManager::Load(this);
    ImplParentVirtualFunctionsData data;
    EditorConfigST::Get()->ReadObject(wxT("ImplParentVirtualFunctionsData"), &data);

    m_checkBoxFormat->SetValue(data.GetFlags() & ImplParentVirtualFunctionsData::FormatText);
    DoInitialize(false);
}
Esempio n. 16
0
OpenResourceDlg::OpenResourceDlg(wxWindow* parent, IManager* manager)
    : OpenResourceDlgBase(parent)
    , m_mgr(manager)
    , m_timer(NULL)
{
    wxStringSet_t files;
    PHPWorkspace::Get()->GetWorkspaceFiles(files);
    m_table.Open(PHPWorkspace::Get()->GetFilename().GetPath());
    m_allFiles.reserve(files.size());
    std::set<wxString>::iterator iter = files.begin();
    for(; iter != files.end(); iter++) {
        wxFileName fn((*iter));
        if(fn.GetFullName() == FOLDER_MARKER) {
            // fake item
            continue;
        }

        ResourceItem fileItem;
        fileItem.displayName = fn.GetFullName();
        fileItem.filename = fn;
        fileItem.line = -1;
        fileItem.type = ResourceItem::kRI_File;
        m_allFiles.push_back(fileItem);
    }

    DoInitialize();
    m_timer = new wxTimer(this, TIMER_ID);
    m_timer->Start(50, true);
    SetName("OpenResourceDlg");
    WindowAttrManager::Load(this);

    if(m_mgr->GetActiveEditor()) {
        wxString sel = m_mgr->GetActiveEditor()->GetSelection();
        m_textCtrlFilter->ChangeValue(sel);
        m_textCtrlFilter->SelectAll();
    }
}
void PointMovementGenerator<T>::DoReset(T* owner)
{
    MovementGenerator::RemoveFlag(MOVEMENTGENERATOR_FLAG_TRANSITORY | MOVEMENTGENERATOR_FLAG_DEACTIVATED);

    DoInitialize(owner);
}
bool FlightPathMovementGenerator::DoUpdate(Player* player, uint32 /*diff*/)
{
    // xinef: map was switched
    if (_mapSwitch)
    {
        DoInitialize(player);
        _mapSwitch = false;
        return true;
    }

    uint32 pointId = (uint32)player->movespline->currentPathIdx();
    if (pointId > i_currentNode)
    {
        bool departureEvent = true;
        do
        {
            if (i_currentNode >= i_path.size())
            {
                sLog->outMisc("TAXI NODE WAS GREATER THAN PATH SIZE, GUID: %u, POINTID: %u, NODESIZE: %lu, CURRENT: %u", player->GetGUIDLow(), pointId, i_path.size(), i_currentNode);
                player->CleanupAfterTaxiFlight();
                return false;
            }

            if (i_path[i_currentNode]->mapid != player->GetMapId())
            {
                sLog->outMisc("Player on different map, curmap: %u, pointmap: %u, nodesize: %lu, currentnode: %u", player->GetMapId(), i_path[i_currentNode]->mapid, i_path.size(), i_currentNode);
                player->CleanupAfterTaxiFlight();
                return false;
            }

            DoEventIfAny(player, i_path[i_currentNode], departureEvent);

            // xinef: erase any previous points
            uint32 curSize = _pointsForPathSwitch.size();
            while (!_pointsForPathSwitch.empty() && _pointsForPathSwitch.front() <= i_currentNode)
                _pointsForPathSwitch.pop_front();

            // xinef: switch destination only once
            if (curSize != _pointsForPathSwitch.size())
                player->m_taxi.NextTaxiDestination();

            if (pointId == i_currentNode)
                break;

            if (i_currentNode == _preloadTargetNode && player->GetMapId() == _endMapId)
                PreloadEndGrid();
            i_currentNode += (uint32)departureEvent;
            departureEvent = !departureEvent;

            // xinef: map should be switched, do not rely on client packets QQ
            if (i_currentNode + 1 < i_path.size() && i_path[i_currentNode+1]->mapid != player->GetMapId())
            {
                ++i_currentNode;
                _mapSwitch = true;
                player->TeleportTo(i_path[i_currentNode]->mapid, i_path[i_currentNode]->x, i_path[i_currentNode]->y, i_path[i_currentNode]->z, player->GetOrientation(), TELE_TO_NOT_LEAVE_TAXI);
                return true;
            }

            // xinef: reached the end
            if (i_currentNode >= i_path.size() - 1)
            {
                player->CleanupAfterTaxiFlight();
                player->SetFallInformation(time(NULL), player->GetPositionZ());
                if (player->pvpInfo.IsHostile)
                    player->CastSpell(player, 2479, true);

                return false;
            }
        }
        while (true);
    }

    return i_currentNode < (i_path.size() - 1);
}
void FleeingMovementGenerator<T>::DoReset(T* owner)
{
    DoInitialize(owner);
}
Esempio n. 20
0
void ChaseMovementGenerator<T>::DoReset(T* owner)
{
    DoInitialize(owner);
}
Esempio n. 21
0
void FollowMovementGenerator<T>::DoReset(T* owner)
{
    DoInitialize(owner);
}
Esempio n. 22
0
ListCtrlImproved::ListCtrlImproved(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: wxListCtrl(parent, id, pos, size, style | wxLC_REPORT)
{
	DoInitialize();
}
void HomeMovementGenerator<Creature>::DoReset(Creature* owner)
{
    DoInitialize(owner);
}
void ConfusedMovementGenerator<T>::DoReset(T* unit)
{
	DoInitialize(unit);
}
Esempio n. 25
0
void APower::ServerInitialize_Implementation(int32 UID)
{
  if (Cast<AMapState>(GetWorld()->GameState) == NULL && !IsInitialized) { return; }
  if (!Cast<AMapState>(GetWorld()->GameState)->PowersDB->CheckExists(UID)) { return; }
  DoInitialize(UID);
}
/**
Function to map the input command to respective function.

@return - True Upon successfull command to Function name mapping otherwise False
@param aCommand Function name has to be called
@param aSection INI file paramenter section name
@param aAsyncErrorIndex Error index
@see Refer the script file COMMAND section.

@internalTechnology
*/
TBool CTlsUnitTestWrapper::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
	{
	TBool ret = ETrue;
	
	// Print out the parameters for debugging
	INFO_PRINTF2( KCommand, &aCommand );
	INFO_PRINTF2( KSection, &aSection );
	INFO_PRINTF2( KAsyncErrorIndex, aAsyncErrorIndex );
	
	if (KInitialize() == aCommand)
		{
		DoInitialize();
		}
	else if (KSetUnsupportedProtocol() == aCommand)
		{
		DoSetUnsupportedProtocol();
		}
	else if (KServerCert() == aCommand)
		{
		DoServerCert();
		}
	else if (KRenegotiateHandshake() == aCommand)
		{
		DoRenegotiateHandshake();
		}
	else if (KSetProtocol() == aCommand)
		{
		DoSetProtocol();
		}
	else if (KCurrentCipherSuite() == aCommand)
		{
		DoCurrentCipherSuite();
		}
	else if (KMakePageRequest() == aCommand)
		{
		DoMakePageRequest();
		}
	else if (KGetServerResponse() == aCommand)
		{
		DoGetServerResponse();
		}
	else if (KReadServerResponse() == aCommand)
		{
		DoReadServerResponse();
		}
	else if (KConnectionClosedL() == aCommand)
		{
		DoConnectionClosed();
		}
	else if (KConnect() == aCommand)
		{
		DoConnect(aSection);
		}
	else if (KTLSHandshake() == aCommand)
		{
		DoTLSHandshake();
		}
	else if (KServerCertGetOpt() == aCommand)
		{
		DoServerCertGetOpt();
		}
	else if (KEnableNullCipher() == aCommand)
		{
		DoEnableNullCipher();
		}
	else if (KSSLv2handshake() == aCommand)
		{
		DoSSLv2handshake();
		}
	else if (KPskGetConfig() == aCommand)
		{
		DoPskGetConfig();
		}
	else if (KPskSetConfig() == aCommand)
		{
		DoPskSetConfig();
		}
	else if (KCheckSetOptDefault() == aCommand)
		{
		DoCheckSetOptDefault();
		}
	else if (KCheckGetOptDefault() == aCommand)
		{
		DoCheckGetOptDefault();
		}
	else if (KSetDialogMode() == aCommand)
		{
		DoSetDialogMode();
		}
	else
		{
		ret = EFalse;
		User::LeaveIfError(KErrNone); // just to suppress LeaveScan warning
		}
	return ret;
	}
Esempio n. 27
0
BatchBuildDlg::BatchBuildDlg( wxWindow* parent )
    : BatchBuildBaseDlg( parent )
{
    m_checkListConfigurations->SetFocus();
    DoInitialize();
}
void RandomMovementGenerator<Creature>::DoReset(Creature* creature)
{
    DoInitialize(creature);
}
// -----------------------------------------------------------------------------
// CAmrPayloadFormatter::Initialize
// Initialize formatter. MUST be done always when starting decoding/encoding
// possibly after pause/stop. Redundant frames collected so far are destroyed as
// well as frames received for redundancy detection.
// -----------------------------------------------------------------------------
//
void CAmrPayloadFormatter::Initialize()
    {
    iFrameDatas.ResetAndDestroy();
    DoInitialize();
    }