Ejemplo n.º 1
0
  OscapePrg::OscapePrg(wxWindow *parent) : wxProgress(parent) {
    evtLeave = wxNewEventType();
    idLeave = wxNewId();

    /* Connect to event handler that will make us close */
    Connect(wxID_ANY, evtLeave,
      (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction)wxStaticCastEvent(LeaveEventFunction, &OscapePrg::Leave),
      NULL,
      this);

    evtProgress = wxNewEventType();
    idProgress = wxNewId();

    /* Connect to event handler that will make us close */
    Connect(wxID_ANY, evtProgress,
      (wxObjectEventFunction)(wxEventFunction)(wxCommandEventFunction)wxStaticCastEvent(ProgressEventFunction, &OscapePrg::Progress),
      NULL,
      this);

    tinit = time(NULL);
    paused = false;
    quit = false;
    prg = this;

    evt = CreateEvent(
      NULL,		  // default security attributes
      TRUE,		  // manual reset
      TRUE,		  // initially set
      NULL		  // unnamed mutex
      );

    end = CreateEvent(
      NULL,		  // default security attributes
      TRUE,		  // manual reset
      FALSE,		  // initially not set
      NULL		  // unnamed mutex
      );

    SetSize(600, 265);
  }
Ejemplo n.º 2
0
#include "refactorengine.h"
#include "cppwordscanner.h"
#include "entry.h"
#include "ctags_manager.h"
#include "fileextmanager.h"
#include <wx/progdlg.h>
#include <wx/sizer.h>
#include "progress_dialog.h"
#include "refactoring_storage.h"

const wxEventType wxEVT_REFACTORING_ENGINE_CACHE_INITIALIZING = wxNewEventType();

RefactoringEngine::RefactoringEngine()
{
}

RefactoringEngine::~RefactoringEngine()
{
}

RefactoringEngine* RefactoringEngine::Instance()
{
    static RefactoringEngine ms_instance;
    return &ms_instance;
}


void RefactoringEngine::Clear()
{
    m_possibleCandidates.clear();
    m_candidates.clear();
Ejemplo n.º 3
0
#endif            // __WXMSW__

void OCP_DataStreamInput_Thread::Parse_And_Send_Posn(const char *buf)
{
    if( m_pMessageTarget ) {
        OCPN_DataStreamEvent Nevent(wxEVT_OCPN_DATASTREAM, 0);
        Nevent.SetNMEAString( buf );
        Nevent.SetStream( m_launcher );

        m_pMessageTarget->AddPendingEvent(Nevent);
    }

    return;
}

const wxEventType wxEVT_OCPN_THREADMSG = wxNewEventType();

void OCP_DataStreamInput_Thread::ThreadMessage(const wxString &msg)
{
    //    Signal the main program thread
    OCPN_ThreadMessageEvent event(wxEVT_OCPN_THREADMSG, 0);
    event.SetSString( std::string(msg.mb_str()));
    if( gFrame )
        gFrame->GetEventHandler()->AddPendingEvent(event);
}

bool OCP_DataStreamInput_Thread::SetOutMsg(const wxString &msg)
{
    //  Assume that the caller already owns the mutex
    wxCriticalSectionLocker locker( m_outCritical );
    
Ejemplo n.º 4
0
    One quirk is that the top-level implementation object (m_top) always
    keeps a pointer to the implementation object where a new child is needed.
    (m_add_child_target).  This is so that when a new uesr view is added
    to the hierarchy, AddChild() is able to reparent the new user view to
    the correct implementation object's leaf.

*/

#include "wx/dcmemory.h"
#include "wx/dcscreen.h"
#include "wx/layout.h"
#include "wx/scrolbar.h"
#include "wx/settings.h"


const wxEventType wxEVT_DYNAMIC_SASH_SPLIT = wxNewEventType();
const wxEventType wxEVT_DYNAMIC_SASH_UNIFY = wxNewEventType();
const wxEventType wxEVT_DYNAMIC_SASH_REPARENT = wxNewEventType();

enum DynamicSashRegion
{
    DSR_NONE,
    DSR_VERTICAL_TAB,
    DSR_HORIZONTAL_TAB,
    DSR_CORNER,
    DSR_LEFT_EDGE,
    DSR_TOP_EDGE,
    DSR_RIGHT_EDGE,
    DSR_BOTTOM_EDGE
};
Ejemplo n.º 5
0
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////
// $URL: http://svn.rebarp.se/svn/RME/trunk/source/updater.hpp $
// $Id: updater.hpp 310 2010-02-26 18:03:48Z admin $

#include "main.h"

#ifdef _USE_UPDATER_

#include <wx/url.h>

#include "json.h"

#include "updater.h"

const wxEventType EVT_UPDATE_CHECK_FINISHED = wxNewEventType();

UpdateChecker::UpdateChecker()
{
	////
}

UpdateChecker::~UpdateChecker()
{
	////
}

void UpdateChecker::connect(wxEvtHandler* receiver)
{
	wxString address = wxT("http://www.remeresmapeditor.com/update.php");
	address << wxT("?os=") << 
#include <wx/tokenzr.h>
#include <wx/valgen.h>
#include "project/Assets.h"
#include "Triumph.h"

// these macros will expand a pre-processor define into code
// these are needed to expand the update host which
// are given as aa pre-processor define by the premake script
#define T4P_STR_EXPAND(s) #s
#define T4P_STR(s) T4P_STR_EXPAND(s)

static int ID_VERSION_FEATURE_TIMER = wxNewId();
static int ID_VERSION_DIALOG_TIMER = wxNewId();
static int ID_EVENT_VERSION_UPDATES = wxNewId();
static int ID_EVENT_VERSION_UPDATES_ON_DIALOG = wxNewId();
static wxEventType EVENT_VERSION_CHECK = wxNewEventType();


t4p::VersionUpdateViewClass::VersionUpdateViewClass(t4p::VersionUpdateFeatureClass& feature)
    : FeatureViewClass()
    , Feature(feature)
    , Timer(this, ID_VERSION_FEATURE_TIMER) {
}

void t4p::VersionUpdateViewClass::AddHelpMenuItems(wxMenu* helpMenu) {
    helpMenu->Append(t4p::MENU_VERSION_UPDATE, _("Check for updates"),
                     _("Check for new version of Triumph"), wxITEM_NORMAL);
}

void t4p::VersionUpdateViewClass::AddPreferenceWindow(wxBookCtrlBase* parent) {
    VersionUpdatePreferencesPanelClass* panel = new t4p::VersionUpdatePreferencesPanelClass(
Ejemplo n.º 7
0
 * File:    imgthread.cpp
 * Authors: Björn Petersen
 * Purpose: Silverjuke image thread'n'cache
 *
 ******************************************************************************/


#include <sjbase/base.h>
#include <sjtools/imgthread.h>
#include <sjtools/console.h>

#include <wx/listimpl.cpp> // sic!
WX_DEFINE_LIST(SjImgThreadObjList);


const wxEventType wxEVT_IMAGE_THERE = wxNewEventType();


/*******************************************************************************
 * SjImgThread - Thread Entry Point
 ******************************************************************************/


void* SjImgThread::Entry()
{
	int                         getFirst = -1;
	SjImgThreadObjList::Node*   node;
	SjImgThreadObj*             obj = NULL;
	bool                        objOk;
	long                        imagesThisRound;
	}
}

int DataViewCtrlHeaderMenu::CountVisibleColumns()
{

	int totalVisibleColumnsCount = 0;
	int totalColumnsCount = parentDataView->GetColumnCount();

	for (int i = 0; i < totalColumnsCount; ++i) {
		wxDataViewColumn* column = parentDataView->GetColumn(i);
		if (!column->IsHidden()) {
			totalVisibleColumnsCount++;
		}
	}

	return totalVisibleColumnsCount;
}

void DataViewCtrlHeaderMenu::OnShowColumns(wxCommandEvent&)
{
	wxCommandEvent newEvent;

	newEvent.SetEventType(SHOW_ALL_COLUMNS_EVT);

	parentDataView->GetEventHandler()->ProcessEvent(newEvent);
}

wxEventType DataViewCtrlHeaderMenu::HIDE_COLUMN_EVT = wxNewEventType();
wxEventType DataViewCtrlHeaderMenu::SHOW_ALL_COLUMNS_EVT = wxNewEventType();
Ejemplo n.º 9
0
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#include "CommonIncludes.h"
#include "EncFSMPErrorLog.h"

const wxEventType errorLogEventType = wxNewEventType();

enum
{
	ID_NEW_ERROR_LOG_ENTRY = 3000
};

EncFSMPErrorLog::EncFSMPErrorLog(wxWindow* parent)
	: EncFSMPErrorLogBase(parent), isWindowShown_(false),
	showErrorLogOnErr_(true), mutex_()
{
}

EncFSMPErrorLog::~EncFSMPErrorLog()
{
}
Ejemplo n.º 10
0
#include "cc_box_tip_window.h"
#include <wx/bitmap.h>
#include <wx/dcmemory.h>
#include "ieditor.h"
#include <wx/settings.h>
#include <wx/dcbuffer.h>
#include "bitmap_loader.h"
#include <wx/tokenzr.h>
#include <wx/spinctrl.h>
#include "Markup.h"
#include "event_notifier.h"
#include "editor_config.h"
#include <wx/stc/stc.h>
#include "file_logger.h"

const wxEventType wxEVT_TIP_BTN_CLICKED_UP   = wxNewEventType();
const wxEventType wxEVT_TIP_BTN_CLICKED_DOWN = wxNewEventType();

CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString& tip)
    : wxPopupWindow(parent)
    , m_tip(tip)
{
    while ( m_tip.Replace("\n\n", "\n") ) {}
    DoInitialize(m_tip, 1, true);
}

CCBoxTipWindow::CCBoxTipWindow(wxWindow* parent, const wxString &tip, size_t numOfTips, bool simpleTip)
    : wxPopupWindow(parent)
    , m_tip(tip)
{
    while ( m_tip.Replace("\n\n", "\n") ) {}
#ifdef __WXMSW__
    wxFSVolume::CancelSearch();
#endif
}

wxString t4p::VolumeListActionClass::GetLabel() const {
    return wxT("Volume List");
}

t4p::VolumeListEventClass::VolumeListEventClass(int id,
        const std::vector<wxString>& localVolumes)
    : wxEvent(id, t4p::EVENT_ACTION_VOLUME_LIST)
    , LocalVolumes() {
    t4p::DeepCopy(LocalVolumes, localVolumes);
}

wxEvent* t4p::VolumeListEventClass::Clone() const {
    return new t4p::VolumeListEventClass(GetId(), LocalVolumes);
}

const wxEventType t4p::EVENT_ACTION_VOLUME_LIST = wxNewEventType();

BEGIN_EVENT_TABLE(t4p::FileWatcherFeatureClass, t4p::FeatureClass)
    EVT_COMMAND(wxID_ANY, t4p::EVENT_APP_READY, t4p::FileWatcherFeatureClass::OnAppReady)
    EVT_COMMAND(wxID_ANY, t4p::EVENT_APP_EXIT, t4p::FileWatcherFeatureClass::OnAppExit)
    EVT_TIMER(ID_FILE_MODIFIED_CHECK, t4p::FileWatcherFeatureClass::OnTimer)
    EVT_FSWATCHER(wxID_ANY, t4p::FileWatcherFeatureClass::OnFsWatcher)
    EVT_COMMAND(wxID_ANY, t4p::EVENT_APP_PREFERENCES_SAVED, t4p::FileWatcherFeatureClass::OnPreferencesSaved)
    EVT_ACTION_VOLUME_LIST(wxID_ANY, t4p::FileWatcherFeatureClass::OnVolumeListComplete)
END_EVENT_TABLE()
Ejemplo n.º 12
0
    // return FALSE so other process in our group are allowed to process this event
    return FALSE;
}
#endif

#include <sys/types.h>
#include <signal.h>

#if 0
#    define DBG_LOG 1
static wxFFile gfp(wxT("debugger.log"), wxT("w+"));
#else
#    define DBG_LOG 0
#endif

const wxEventType wxEVT_GDB_STOP_DEBUGGER     = wxNewEventType();

//Using the running image of child Thread 46912568064384 (LWP 7051).
static wxRegEx reInfoProgram1( wxT( "\\(LWP[ \t]([0-9]+)\\)" ) );
//Using the running image of child process 10011.
static wxRegEx reInfoProgram2( wxT( "child process ([0-9]+)" ) );
//Using the running image of child thread 4124.0x117c
static wxRegEx reInfoProgram3( wxT( "Using the running image of child thread ([0-9]+)" ) );

#ifdef __WXMSW__
static wxRegEx reConnectionRefused( wxT( "[0-9a-zA-Z/\\\\-\\_]*:[0-9]+: No connection could be made because the target machine actively refused it." ) );
#else
static wxRegEx reConnectionRefused( wxT( "[0-9a-zA-Z/\\\\-\\_]*:[0-9]+: Connection refused." ) );
#endif
DebuggerInfo GetDebuggerInfo()
{
Ejemplo n.º 13
0
// wxWindows headers
#include <wx/wx.h>

// PostgreSQL headers
#include <libpq-fe.h>

// App headers
#include "db/pgSet.h"
#include "db/pgConn.h"
#include "db/pgQueryThread.h"
#include "db/pgQueryResultEvent.h"
#include "utils/pgDefs.h"
#include "utils/sysLogger.h"

const wxEventType PGQueryResultEvent = wxNewEventType();

// default notice processor for the pgQueryThread
// we do assume that the argument passed will be always the
// object of pgQueryThread
void pgNoticeProcessor(void *_arg, const char *_message)
{
	wxString str(_message, wxConvUTF8);

	wxLogNotice(wxT("%s"), str.Trim().c_str());
	if (_arg)
	{
		((pgQueryThread *)_arg)->AppendMessage(str);
	}
}
Ejemplo n.º 14
0
}

CodeBlocksLogEvent::CodeBlocksLogEvent(wxEventType commandType, wxWindow* window_in, const wxString& title_in, wxBitmap *icon_in)
    : wxEvent(wxID_ANY, commandType),
    logger(nullptr), logIndex(-1), icon(icon_in), title(title_in), window(window_in)
{
}

CodeBlocksLogEvent::CodeBlocksLogEvent(const CodeBlocksLogEvent& rhs)
    : wxEvent(wxID_ANY, rhs.GetEventType()), logger(rhs.logger), logIndex(rhs.logIndex), icon(rhs.icon), title(rhs.title), window(rhs.window)
{
}


// app events
const wxEventType cbEVT_APP_STARTUP_DONE = wxNewEventType();
const wxEventType cbEVT_APP_START_SHUTDOWN = wxNewEventType();
const wxEventType cbEVT_APP_ACTIVATED = wxNewEventType();
const wxEventType cbEVT_APP_DEACTIVATED = wxNewEventType();
// plugin events
const wxEventType cbEVT_PLUGIN_ATTACHED = wxNewEventType();
const wxEventType cbEVT_PLUGIN_RELEASED = wxNewEventType();
const wxEventType cbEVT_PLUGIN_INSTALLED = wxNewEventType();
const wxEventType cbEVT_PLUGIN_UNINSTALLED = wxNewEventType();
const wxEventType cbEVT_PLUGIN_LOADING_COMPLETE = wxNewEventType();
// editor events
const wxEventType cbEVT_EDITOR_CLOSE = wxNewEventType();
const wxEventType cbEVT_EDITOR_OPEN = wxNewEventType();
const wxEventType cbEVT_EDITOR_SWITCHED = wxNewEventType();
const wxEventType cbEVT_EDITOR_ACTIVATED = wxNewEventType();
const wxEventType cbEVT_EDITOR_DEACTIVATED = wxNewEventType();
Ejemplo n.º 15
0
#include "bf/item_reference_edit.hpp"
#include "bf/set_edit.hpp"
#include "bf/wx_facilities.hpp"
#include "bf/any_animation_edit.hpp"
#include "bf/font_edit.hpp"
#include "bf/sample_edit.hpp"
#include "bf/sprite_edit.hpp"

#include "bf/call_by_field_type.hpp"

#include <list>
#include <claw/assert.hpp>

/*----------------------------------------------------------------------------*/
const wxEventType
bf::delete_item_field_event::delete_field_event_type = wxNewEventType();

/*----------------------------------------------------------------------------*/
/**
 * \brief Constructor.
 * \param field_name The name of the cleared field.
 * \param t The type of the event.
 * \param id The id of the window that generates the event.
 */
bf::delete_item_field_event::delete_item_field_event
( const std::string& field_name, wxEventType t, wxWindowID id )
  : wxNotifyEvent(t, id), m_field_name(field_name)
{

} // delete_item_field_event::delete_item_field_event()
Ejemplo n.º 16
0
 * Contains the class that defines the raw data event.
 */

#include "DeviceEvent.h"

#ifdef _DEBUG
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
#define new DEBUG_NEW
#else
#define DEBUG_NEW new
#endif

IMPLEMENT_DYNAMIC_CLASS (DeviceEvent, wxEvent)

const wxEventType DEVICE_EVENT = wxNewEventType();


DeviceEvent::DeviceEvent()
{
	SetEventType (DEVICE_EVENT);

	length = 1;
	rawData = new unsigned char[length];
	rawData[0] = 0;

	inAvailable = 1;
	outAvailable = 1;

	variables = new std::map<int, int>();
}
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "config.h"
#include "MainThread.h"

#include <wx/defs.h>
#include <wx/app.h>
#include <wx/event.h>

const wxEventType wxEVT_CALL_AFTER = wxNewEventType();

class wxCallAfter : public wxEvtHandler
{
public:
    wxCallAfter() 
        : wxEvtHandler()
        {
            wxTheApp->Connect(-1, -1, wxEVT_CALL_AFTER, wxCommandEventHandler(wxCallAfter::OnCallback));
            wxCommandEvent event(wxEVT_CALL_AFTER);
            wxPostEvent(wxTheApp, event);
        }
        
    void OnCallback(wxCommandEvent& event)
    {
        WTF::dispatchFunctionsFromMainThread();
Ejemplo n.º 18
0
  for (auto const &line : lines) {
    wxCommandEvent evt(mux_process::event, mux_process::output_available);
    evt.SetString(wxU(line));
    wxPostEvent(this, evt);
  }
}

void
mux_dialog::on_read_input(wxTimerEvent &) {
  if (m_process)
    m_process->process_input();
}

// ------------------------------------------------------------

wxEventType const mux_process::event{wxNewEventType()};

mux_process::mux_process(mux_dialog *dialog)
  : wxProcess(wxPROCESS_REDIRECT)
  , m_dialog(dialog)
{
}

void
mux_process::OnTerminate(int,
                         int status) {
  process_input();

  if (!m_dialog)
    return;
Ejemplo n.º 19
0
// datalist.cpp
// Copyright (c) 2007-2016 by Troels K. All rights reserved.
// License: wxWindows Library Licence, Version 3.1 - see LICENSE.txt

#include "precomp.h"

#include "wx/ext/gui.h"
#include "datamodel.h"
#include "datalist.h"

const wxEventType wxEVT_LIST_CELL_CLICK = wxNewEventType();
const wxEventType wxEVT_LIST_CELL_DCLICK = wxNewEventType();

#if USE_DATALISTVIEW
wxIMPLEMENT_DYNAMIC_CLASS(DataModelListCtrl, wxDataViewCtrl);
wxBEGIN_EVENT_TABLE(DataModelListCtrl, wxDataViewCtrl)
    EVT_DATAVIEW_ITEM_ACTIVATED(wxID_ANY, DataModelListCtrl::OnDoubleClick)
wxEND_EVENT_TABLE()
#else
wxIMPLEMENT_DYNAMIC_CLASS(DataModelListCtrl, wxTrunkListView);
wxBEGIN_EVENT_TABLE(DataModelListCtrl, wxTrunkListView)
    EVT_KEY_DOWN(DataModelListCtrl::OnKeyDown)
    EVT_LIST_ITEM_SELECTED(wxID_ANY, DataModelListCtrl::OnSelectionChanged)
    EVT_LIST_ITEM_ACTIVATED(wxID_ANY, DataModelListCtrl::OnItemActivated)
    EVT_LIST_BEGIN_LABEL_EDIT(wxID_ANY, DataModelListCtrl::OnBeginLabelEdit)
    EVT_LIST_END_LABEL_EDIT(wxID_ANY, DataModelListCtrl::OnEndLabelEdit)
    EVT_COMMAND_LEFT_CLICK(wxID_ANY, DataModelListCtrl::OnClick)
    EVT_COMMAND_LEFT_DCLICK(wxID_ANY, DataModelListCtrl::OnDoubleClick)
wxEND_EVENT_TABLE()
#endif
Ejemplo n.º 20
0
#include <filezilla.h>

#include "iothread.h"

#include <wx/log.h>

const wxEventType fzEVT_IOTHREAD = wxNewEventType();

CIOThreadEvent::CIOThreadEvent(int id /*=wxID_ANY*/)
	: wxEvent(id, fzEVT_IOTHREAD)
{
}

wxEvent* CIOThreadEvent::Clone() const
{
	return new CIOThreadEvent(GetId());
}

CIOThread::CIOThread()
	: wxThread(wxTHREAD_JOINABLE), m_evtHandler(0)
	, m_read()
	, m_binary()
	, m_pFile(0)
	, m_condition(m_mutex)
	, m_curAppBuf()
	, m_curThreadBuf()
	, m_error()
	, m_running()
	, m_threadWaiting()
	, m_appWaiting()
	, m_destroyed()
Ejemplo n.º 21
0
			if (Core::GetState() == Core::CORE_UNINITIALIZED) break;
			// Use default action otherwise

		default:
			// By default let wxWidgets do what it normally does with this event
			return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
	}
	return 0;
}
#endif

// event tables
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
// help button.

const wxEventType wxEVT_HOST_COMMAND = wxNewEventType();

BEGIN_EVENT_TABLE(CFrame, CRenderFrame)

// Menu bar
EVT_MENU(wxID_OPEN, CFrame::OnOpen)
EVT_MENU(wxID_EXIT, CFrame::OnQuit)
EVT_MENU(IDM_HELPWEBSITE, CFrame::OnHelp)
EVT_MENU(IDM_HELPGOOGLECODE, CFrame::OnHelp)
EVT_MENU(wxID_ABOUT, CFrame::OnHelp)
EVT_MENU(wxID_REFRESH, CFrame::OnRefresh)
EVT_MENU(IDM_PLAY, CFrame::OnPlay)
EVT_MENU(IDM_STOP, CFrame::OnStop)
EVT_MENU(IDM_RESET, CFrame::OnReset)
EVT_MENU(IDM_RECORD, CFrame::OnRecord)
EVT_MENU(IDM_PLAYRECORD, CFrame::OnPlayRecording)
Ejemplo n.º 22
0
#include "spinctrl.hpp"

const wxEventType wxEVT_CUSTOM_SPINCTRL = wxNewEventType();

enum
{
    ID_SPIN_UP,
    ID_SPIN_DOWN
};

wxCustomSpinCtrl::wxCustomSpinCtrl( wxWindow*         parent,
                                    wxWindowID        id,
                                    float             min,
                                    float             max,
                                    float             initial,
                                    float             increment,
                                    int               digits )
    :
    wxPanel    ( parent    ),
    m_Parent   ( parent    ),
    m_ID       ( id        ),
    m_Value    ( initial   ),
    m_MaxValue ( max       ),
    m_MinValue ( min       ),
    m_Increment( increment ),
    m_Digits   ( digits    )
{
    m_TextControl = new wxTextCtrl( this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );

    m_SpinButton  = new wxSpinButton( this, wxID_ANY );
    m_SpinButton->SetRange( -100000, +100000 );
Ejemplo n.º 23
0
#include "globalevents.h"
#include <wx/app.h>
#include <list>
#include <map>


const wxEventType GlobalEvent::OnDownloadComplete = wxNewEventType();
const wxEventType GlobalEvent::OnUnitsyncFirstTimeLoad = wxNewEventType();
const wxEventType GlobalEvent::OnUnitsyncReloaded = wxNewEventType();
const wxEventType GlobalEvent::OnSpringTerminated = wxNewEventType();
const wxEventType GlobalEvent::OnSpringStarted = wxNewEventType();
const wxEventType GlobalEvent::UpdateFinished = wxNewEventType();
const wxEventType GlobalEvent::OnQuit = wxNewEventType();
const wxEventType GlobalEvent::OnLogin = wxNewEventType();
const wxEventType GlobalEvent::PlasmaResourceListParsed = wxNewEventType();
const wxEventType GlobalEvent::PlasmaResourceListFailedDownload = wxNewEventType();
const wxEventType GlobalEvent::BattleSyncReload = wxNewEventType();
const wxEventType GlobalEvent::OnUpdateFinished = wxNewEventType();

//const wxEventType GlobalEvent::OnTimerUpdates = wxNewEventType();

//static wxEvtHandler* _evthandler=NULL;
static std::map<wxEventType, std::list<wxEvtHandler*>> evts;

GlobalEvent::GlobalEvent()
: m_handler(NULL)
{

}

GlobalEvent::~GlobalEvent(){
Ejemplo n.º 24
0
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/msgdlg.h>
#include <wx/progdlg.h>
#include <wx/tokenzr.h>
#include <wx/xrc/xmlres.h>

#include "copyrightsconfigdata.h"
#include "event_notifier.h"
#include "globals.h"
#include "file_logger.h"

static Copyright* thePlugin = NULL;

// Internal events used by this plugin
const wxEventType CR_copyrights_options = wxNewEventType();
const wxEventType CR_insert_copyrights = wxNewEventType();
const wxEventType CR_insert_prj_copyrights = wxNewEventType();

// Define the plugin entry point
CL_PLUGIN_API IPlugin* CreatePlugin(IManager* manager)
{
    if(thePlugin == 0) { thePlugin = new Copyright(manager); }
    return thePlugin;
}

CL_PLUGIN_API PluginInfo* GetPluginInfo()
{
    static PluginInfo info;
    info.SetAuthor(wxT("Eran Ifrah"));
    info.SetName(wxT("Copyright"));
Ejemplo n.º 25
0
#include "precompiled_header.h"
#include "globals.h"
#include "stringsearcher.h"
#include "stringsearcher.h"
#include "cl_editor.h"
#include "pluginmanager.h"

#include "cpp_symbol_tree.h"
#include "manager.h"
#include "frame.h"
#include <wx/xrc/xmlres.h>
#include <wx/imaglist.h>

IMPLEMENT_DYNAMIC_CLASS(CppSymbolTree, SymbolTree)

const wxEventType wxEVT_CMD_CPP_SYMBOL_ITEM_SELECTED = wxNewEventType();

//----------------------------------------------------------------
// accessory function
//----------------------------------------------------------------
wxImageList* CreateSymbolTreeImages()
{
    wxImageList *images = new wxImageList(16, 16, true);

    BitmapLoader *bmpLoader = PluginManager::Get()->GetStdIcons();
    images->Add(bmpLoader->LoadBitmap(wxT("mime/16/cpp")));               // 0
    images->Add(bmpLoader->LoadBitmap(wxT("cc/16/namespace")));           // 1
    images->Add(bmpLoader->LoadBitmap(wxT("cc/16/globals")));             // 2
    images->Add(bmpLoader->LoadBitmap(wxT("cc/16/class")));               // 3
    images->Add(bmpLoader->LoadBitmap(wxT("cc/16/struct")));              // 4
    images->Add(bmpLoader->LoadBitmap(wxT("cc/16/function_public")));     // 5
Ejemplo n.º 26
0
    $Id$
*/

#include "stdafx.h"
#include "issoriaApp.h"
#include "guiMain.h"
#include "panelSearchResult.h"
#include "guiServerFolderView.h"

//Do not add custom headers between
//Header Include Start and Header Include End
//wxDev-C++ designer will remove them
////Header Include Start
////Header Include End

const wxEventType guiResultAdd			= wxNewEventType();
const wxEventType guiResultFileAdd		= wxNewEventType();

//----------------------------------------------------------------------------
// tabSearchResult
//----------------------------------------------------------------------------
//Add Custom Events only in the appropriate block.
//Code added in other places will be removed by wxDev-C++
////Event Table Start
BEGIN_EVENT_TABLE(panelSearchResult,wxPanel)
	////Manual Code Start
	EVT_COMMAND(wxID_ANY, guiResultAdd,	panelSearchResult::resultAddEvent)
	EVT_COMMAND(wxID_ANY, guiResultFileAdd,	panelSearchResult::resultFileAddEvent)
	////Manual Code End
	
	EVT_CLOSE(panelSearchResult::OnClose)
            return "wxSOCKET_WOULDBLOCK";

        case wxSOCKET_TIMEDOUT:
            return "wxSOCKET_TIMEDOUT";

        case wxSOCKET_MEMERR:
            return "wxSOCKET_MEMERR";

        default:
            return "Unknown";
    }
}

//event sent by workers to server class
//after client is served
const wxEventType wxEVT_WORKER = wxNewEventType();
#define EVT_WORKER(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) NULL ),

class WorkerEvent : public wxEvent
{
public:
    WorkerEvent(void* pSender)
    {
        SetId(-1);
        SetEventType(wxEVT_WORKER);
        m_sender = pSender;
        m_exit = false;
        m_workerFailed = false;
    }

    virtual wxEvent* Clone() const
Ejemplo n.º 28
0
#endif

#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif // WX_PRECOMP

#include "wx/event.h"
#include "wx/weakref.h"

static int gs_value = 0; // Increased by 1 by first object and 0x10000 by 2nd object

static wxObject *gs_psrc1;
static wxObject *gs_psrc2;

// We need some event types
const wxEventType wxEVT_TEST = wxNewEventType(),
                  wxEVT_TEST1 = wxNewEventType(),
                  wxEVT_TEST2 = wxNewEventType();

class wxTestEvent : public wxEvent
{
public:
    wxTestEvent(wxEventType type = wxEVT_TEST) : wxEvent(0, type) { }
    virtual wxEvent *Clone() const { return new wxTestEvent(GetEventType()); }
};

class wxTestSink : public wxEvtHandler
{
public:
    void OnTestEvent(wxEvent& evt)
    {
Ejemplo n.º 29
0
// ----------------------------------------------------------------------------
// various wxWidgets macros
// ----------------------------------------------------------------------------

// check that the page index is valid
#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())

// ----------------------------------------------------------------------------
// event table
// ----------------------------------------------------------------------------

IMPLEMENT_DYNAMIC_CLASS(wxChoicebook, wxBookCtrlBase)
IMPLEMENT_DYNAMIC_CLASS(wxChoicebookEvent, wxNotifyEvent)

#if !WXWIN_COMPATIBILITY_EVENT_TYPES
const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING = wxNewEventType();
const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = wxNewEventType();
#endif
const int wxID_CHOICEBOOKCHOICE = wxNewId();

BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
    EVT_CHOICE(wxID_CHOICEBOOKCHOICE, wxChoicebook::OnChoiceSelected)
END_EVENT_TABLE()

// ============================================================================
// wxChoicebook implementation
// ============================================================================

// ----------------------------------------------------------------------------
// wxChoicebook creation
// ----------------------------------------------------------------------------
Ejemplo n.º 30
0
// headers
// ----------------------------------------------------------------------------

#include "testprec.h"

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#include "wx/event.h"

// ----------------------------------------------------------------------------
// test events and their handlers
// ----------------------------------------------------------------------------

const wxEventType LegacyEventType = wxNewEventType();

class MyEvent;
wxDEFINE_EVENT(MyEventType, MyEvent);

class MyEvent : public wxEvent
{
public:
    MyEvent() : wxEvent(0, MyEventType) { }

    virtual wxEvent *Clone() const { return new MyEvent; }
};

typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&);
#ifndef wxHAS_EVENT_BIND
    #define MyEventHandler(func) wxEVENT_HANDLER_CAST(MyEventFunction, func)