本文整理汇总了C++中wxCommandEvent::GetExtraLong方法的典型用法代码示例。如果您正苦于以下问题:C++ wxCommandEvent::GetExtraLong方法的具体用法?C++ wxCommandEvent::GetExtraLong怎么用?C++ wxCommandEvent::GetExtraLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxCommandEvent
的用法示例。
在下文中一共展示了wxCommandEvent::GetExtraLong方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eventABORTEN
void tui::LayoutCanvas::OnMouseIN(wxCommandEvent& evt)
{
wxCommandEvent eventABORTEN(wxEVT_CANVAS_STATUS);
if (1 == evt.GetExtraLong())
{ // start mouse input
mouse_input = true;
console::ACTIVE_OP actop;
if (evt.GetInt() > 0) actop = console::op_dwire;
else actop = (console::ACTIVE_OP)evt.GetInt();
DATC->setCurrentOp(actop);
//restricted_move will be true for wire and polygon
restricted_move = (DATC->marker_angle() != 0) &&
((actop > 0) || (actop == console::op_dpoly));
eventABORTEN.SetInt(CNVS_ABORTENABLE);
reperX = (console::op_flipX == actop) || (long_cursor && (console::op_flipY != actop));
reperY = (console::op_flipY == actop) || (long_cursor && (console::op_flipX != actop));
if ( (console::op_flipX == actop)
||(console::op_flipY == actop)
||(console::op_rotate == actop)
||(console::op_cbind == actop)
||(console::op_abind == actop)
||(console::op_tbind == actop) )
rubber_band = true;
releasepoint = TP(0,0);
}
else
{ // stop mouse input
mouse_input = false;
rubber_band = false;
restricted_move = false;
reperX = long_cursor;
reperY = long_cursor;
DATC->setCurrentOp(console::op_none);
wxCommandEvent eventPOSITION(wxEVT_CANVAS_STATUS);
eventPOSITION.SetString(wxT(""));
eventPOSITION.SetInt(CNVS_DEL_Y);
wxPostEvent(this, eventPOSITION);
eventPOSITION.SetInt(CNVS_DEL_X);
wxPostEvent(this, eventPOSITION);
eventABORTEN.SetInt(CNVS_ABORTDISABLE);
}
wxPostEvent(this, eventABORTEN);
}
示例2: eventABORTEN
void tui::LayoutCanvas::OnMouseIN(wxCommandEvent& evt) {
wxCommandEvent eventABORTEN(wxEVT_CNVSSTATUSLINE);
if (1 == evt.GetExtraLong()) {
mouse_input = true;
Properties->setCurrentOp(evt.GetInt());
restricted_move = (Properties->marker_angle() != 0) &&
((evt.GetInt() > 0) || (evt.GetInt() == -1));
eventABORTEN.SetInt(STS_ABORTENABLE);
}
else {
mouse_input = false;
rubber_band = false;
restricted_move = false;
Properties->setCurrentOp(layprop::op_none);
wxCommandEvent eventPOSITION(wxEVT_MARKERPOSITION);
eventPOSITION.SetString(wxT(""));
eventPOSITION.SetInt(DEL_Y);
wxPostEvent(this, eventPOSITION);
eventPOSITION.SetInt(DEL_X);
wxPostEvent(this, eventPOSITION);
eventABORTEN.SetInt(STS_ABORTDISABLE);
}
wxPostEvent(this, eventABORTEN);
}
示例3: switch
void browsers::LayerPanel::OnCommand(wxCommandEvent& event)
{
int command = event.GetInt();
switch (command)
{
case BT_LAYER_DEFAULT:
{
word *oldlay = static_cast<word*>(event.GetClientData());
word layno = event.GetExtraLong();
_buttonMap[*oldlay]->unselect();
_buttonMap[layno]->select();
//_layerlist->defaultLayer((word)event.GetExtraLong(), (word)event.GetInt());
delete (static_cast<word*>(oldlay));
break;
}
case BT_LAYER_HIDE:
{
word *layno = static_cast<word*>(event.GetClientData());
bool status = event.GetExtraLong();
//_buttonMap[layno]->hideLayer(event.IsChecked());
_buttonMap[*layno]->hideLayer(status);
delete (static_cast<word*>(layno));
break;
}
//_layerlist->hideLayer((word)event.GetExtraLong(),event.IsChecked());break;
case BT_LAYER_LOCK:
{
//_layerlist->lockLayer((word)event.GetExtraLong(),event.IsChecked());
word *layno = static_cast<word*>(event.GetClientData());
bool status = event.GetExtraLong();
_buttonMap[*layno]->lockLayer(status);
delete (static_cast<word*>(layno));
break;
}
case BT_LAYER_SELECT:
{
word layno = event.GetExtraLong();
_selectedButton->unselect();
_selectedButton = _buttonMap[layno];
break;
}
case BT_LAYER_ADD:
{
LayerInfo* layer = static_cast<LayerInfo*>(event.GetClientData());
LayerButton *layerButton;
layerButtonMap::iterator it;
int szx, szy;
//Remove selection from current button
if (_selectedButton!=NULL) _selectedButton->unselect();
it = _buttonMap.find(layer->layno());
if (it!= _buttonMap.end())
{
//Button already exists, replace it
LayerButton *tempButton = it->second;
//layerButton = DEBUG_NEW LayerButton(this, tui::TMDUMMY_LAYER+_buttonCount, wxPoint (0, _buttonCount*30), wxSize(200, 30),
//wxBU_AUTODRAW, wxDefaultValidator, _T("TTT"), layer);
int x, y;
int ID;
tempButton->GetPosition(&x, &y);
tempButton->GetSize(&szx, &szy);
ID = tempButton->GetId();
layerButton = DEBUG_NEW LayerButton(this, ID, wxPoint (x, y), wxSize(szx, szy),
wxBU_AUTODRAW|wxNO_BORDER, wxDefaultValidator, _T("button"), layer);
_buttonMap[layer->layno()] = layerButton;
delete tempButton;
}
else
{
//Button doesn't exist, create new button
// int szx, szy;
GetClientSize(&szx, &szy);
layerButton = DEBUG_NEW LayerButton(this, tui::TMDUMMY_LAYER+_buttonCount,
wxPoint (0, _buttonCount*buttonHeight), wxSize(szx, buttonHeight),
wxBU_AUTODRAW, wxDefaultValidator, _T("button"), layer);
_buttonMap[layer->layno()] = layerButton;
_buttonCount++;
this->SetScrollbars(0, buttonHeight, 0, _buttonCount);
}
//Restore selection
if ((it = _buttonMap.find(DATC->curlay()))!= _buttonMap.end())
{
_selectedButton = it->second;
_selectedButton->select();
}
//_selectedButton = (_buttonMap.begin())->second;
//_selectedButton->select();
delete (static_cast<LayerInfo*>(layer));
//.........这里部分代码省略.........
示例4: Command
void wxListBoxBase::Command(wxCommandEvent& event)
{
SetSelection(event.GetInt(), event.GetExtraLong() != 0);
(void)GetEventHandler()->ProcessEvent(event);
}
示例5: RefreshProjectList
void
TreeviewSample::OnFolderChanged( wxCommandEvent& event )
{
m_activeFolder = (int) event.GetExtraLong();
RefreshProjectList();
}
示例6: OnThreadLogMsg
void logevt_handler::OnThreadLogMsg(wxCommandEvent &event) {
LogMsg(flag_wrap<LOGT>(event.GetExtraLong()), stdstrwx(event.GetString()));
}
示例7: eventThreadMessage
void ctrlUpdate::eventThreadMessage( wxCommandEvent &event )
{
int write_pointer,checksum16;
unsigned long intflash_blocksize,max_intflash_blocknumber,extflash_blocksize,max_extflash_blocknumber;
int block_number;
int i = event.GetInt();
int id = i & 0xFFFF;
int type = (i >> 16) & 0xFFFF;
CDeviceNode* pNode = m_plistNode->GetNodeByNickName(id);
wxString strData = event.GetString();
vscpEvent* pVscp = new vscpEvent;
getVscpDataFromString( pVscp, strData );
if(pNode != NULL)
{
if(event.GetExtraLong()==0)
{
switch(type)
{
case VSCP_TYPE_PROTOCOL_ACK_BOOT_LOADER:
// pVscp->pdata[ 0 ] = 2; MSB internal flash block size
// pVscp->pdata[ 1 ] = 2; MSB spi flash block size
// pVscp->pdata[ 2 ] = 0; LSB spi flash block size
// pVscp->pdata[ 3 ] = 0; LSB internal flash block size
// pVscp->pdata[ 4 ] = 1; MSB internal flash number of block avalaible
// pVscp->pdata[ 5 ] = 4; MSB spi flash number of block avalaible
// pVscp->pdata[ 6 ] = 0; LSB spi flash number of block avalaible
// pVscp->pdata[ 7 ] = 0; LSB internal flash number of block avalaible
intflash_blocksize = (pVscp->pdata[0] << 8) | pVscp->pdata[3];
extflash_blocksize = (pVscp->pdata[1] << 8) | pVscp->pdata[2];
max_intflash_blocknumber = (pVscp->pdata[4] << 8) | pVscp->pdata[7];
max_extflash_blocknumber = (pVscp->pdata[5] << 8) | pVscp->pdata[6];
if((intflash_blocksize == BLOCKDATA_SIZE) &&
(extflash_blocksize == BLOCKDATA_SIZE) &&
(max_intflash_blocknumber >= (m_IntFlashBinaryLength/BLOCKDATA_SIZE))&&
(max_extflash_blocknumber >= (m_ExtFlashBinaryLength/BLOCKDATA_SIZE))
)
{
crcInit();
m_nTotalChecksum = 0;
m_nCurrentBlockNumber = 0;
m_nCurrentFlashType = INT_FLASH; // internal flash
// attenzione: questo messaggio (VSCP_TYPE_PROTOCOL_ACK_BOOT_LOADER) è l'ultimo arrivato dal
// programma user, ora ha preso il controllo il bootloader; è probabile che sia necessario
// un delay prima di trasmettere il messaggio di "start block transfer"
wxMilliSleep( 2000 );//wxMilliSleep( 500 );//wxMilliSleep( 200 );
StartBlockTransferMsg( pNode->GetNickName(), m_nCurrentBlockNumber, m_nCurrentFlashType );
}
else
{
UpdateError(pNode);
}
//::wxGetApp().logMsg ( _("event ack bootloader"), DAEMON_LOGMSG_CRITICAL );
break;
case VSCP_TYPE_PROTOCOL_START_BLOCK_ACK:
// pVscp->pdata[0] MSB block number
// pVscp->pdata[1] INTERNAL_FLASH/SPI_FLASH
// pVscp->pdata[2]
// pVscp->pdata[3] LSB block number
if(m_nCurrentFlashType == pVscp->pdata[1])
{
switch(m_nCurrentFlashType)
{
case INT_FLASH:
DataBlockTransferMsg();
m_nChecksum = crcFast( &m_pIntFlashBinaryContent[USER_PROGRAM_ADDRESS + m_nCurrentBlockNumber*BLOCKDATA_SIZE], BLOCKDATA_SIZE );//crcFast( &m_pIntFlashBinaryContent[30208], BLOCKDATA_SIZE );//crcFast( &m_pIntFlashBinaryContent[USER_PROGRAM_ADDRESS + m_nCurrentBlockNumber*BLOCKDATA_SIZE], BLOCKDATA_SIZE );
//m_nTotalChecksum += m_nChecksum;
break;
case EXT_FLASH:
DataBlockTransferMsg();
m_nChecksum = crcFast( &m_pExtFlashBinaryContent[m_nCurrentBlockNumber*BLOCKDATA_SIZE], BLOCKDATA_SIZE );
break;
}
}
else
{
UpdateError(pNode);
}
//::wxGetApp().logMsg ( _("event ack data block"), DAEMON_LOGMSG_CRITICAL );
break;
case VSCP_TYPE_PROTOCOL_BLOCK_DATA_ACK:
// pVscp->pdata[0] = (checksum16 >> 8) & 0xFF; MSB 16 bit CRC for block
// pVscp->pdata[1] = checksum16 & 0xFF; LSB 16 bit CRC for block
// pVscp->pdata[2] = (write_pointer >> 8) & 0xFF; MSB of block number
// pVscp->pdata[3] = 0;
// pVscp->pdata[4] = 0;
// pVscp->pdata[5] = write_pointer & 0xFF; LSB of block number
checksum16 = (pVscp->pdata[0] << 8) | pVscp->pdata[1];
write_pointer = (pVscp->pdata[2] << 8) | pVscp->pdata[5];
if((checksum16 == m_nChecksum) && (write_pointer == m_nCurrentBlockNumber))
BlockProgramMsg( m_nCurrentBlockNumber, m_nCurrentFlashType );
else
{
// in questo caso di errore si ritrasmette il blocco
StartBlockTransferMsg( pNode->GetNickName(), m_nCurrentBlockNumber, m_nCurrentFlashType );
//UpdateError(pNode);
}
//.........这里部分代码省略.........
示例8: OnTagThreadProg
//------------------------------------------------------------------//
//--- an progress thread event was caught, figure out what to do ---//
//------------------------------------------------------------------//
void MusikTagFrame::OnTagThreadProg( wxCommandEvent& event )
{
gProgress->SetValue( event.GetExtraLong() );
}