Example #1
0
void DumpPresenter::OnCheck_AddrBin(wxCommandEvent &event)
{
	Config::Get()->dumpPresenterAddrBin =
		wxDynamicCast(FindWindow(ID_CHK_AddrBin), wxCheckBox)->GetValue();
	Config::Get()->WriteBurst();
	UpdateContents();
}
Example #2
0
void DumpPresenter::OnRadioBtn_Column(wxCommandEvent &event)
{
	Config::Get()->dumpPresenterColumns =
		wxDynamicCast(FindWindow(ID_RB_COL4), wxRadioButton)->GetValue()? 4 :
		wxDynamicCast(FindWindow(ID_RB_COL8), wxRadioButton)->GetValue()? 8 :
		wxDynamicCast(FindWindow(ID_RB_COL16), wxRadioButton)->GetValue()? 16 :
		4;
	Config::Get()->WriteBurst();
	UpdateContents();
}
Example #3
0
void CGUIViewControl::UpdateView()
{
//  CLog::Log(LOGDEBUG,"UpdateView: %i", m_currentView);
    if (m_currentView < 0 || m_currentView >= (int)m_visibleViews.size())
        return; // no valid current view!

    CGUIControl *pControl = m_visibleViews[m_currentView];
    // get the currently selected item
    int item = GetSelectedItem(pControl);
    UpdateContents(pControl, item < 0 ? 0 : item);
}
Example #4
0
//////////////////////////////////////////////////////////////////////////////
// Description: Timer handler - periodically refreshes tabs, determines
//				active MDIChild and updates window names
//////////////////////////////////////////////////////////////////////////////
void COXTabWorkspace::OnTimer(UINT nIDEvent) 
{
	if(nIDEvent!=IDT_MDI_STATUS_TIMER)
	{
		CTabCtrl::OnTimer(nIDEvent);
		return;
	}

	// Update active MDIChild and window text
	UpdateContents(TRUE);
}
Example #5
0
    ChatListPaneImpl(const WinPoint& ptSize):
        m_ptItemSize(ptSize.X(), 12), m_bAutoscroll(true), m_bIgnoreScrollingEvents(false)
    {
        m_bPlayerChatsOnly = true;
        m_pListPane = ListPaneOld::Create(ptSize, 12, true, NULL),
        InsertAtBottom(m_pListPane);
		//mdvalley: I hate C3867.
        AddEventTarget(&ChatListPaneImpl::OnListSelect, m_pListPane->GetEventSource());
        AddEventTarget(&ChatListPaneImpl::OnScroll, m_pListPane->GetScrollEvent());
        UpdateContents();
        m_keyboardDelegate = IKeyboardInput::CreateDelegate(this);
        GetWindow()->AddKeyboardInputFilter(m_keyboardDelegate);
    }
Example #6
0
    void OnChatMessageChange()
    {
        // save some info about the current state of the chat list
        int countOld = m_pListPane->GetCountItems();
        int posOld = m_pListPane->GetScrollPosition();

        UpdateContents();

        // if the number of items did not change, assume we were just doing 
        // something like marking a player as dead so keep the current scroll
        // position.  
        if (countOld == m_pListPane->GetCountItems())
            m_pListPane->SetScrollPosition(posOld);
    }
Example #7
0
// Most contracts calculate their ID by hashing the Raw File (signatures and all).
// The Basket only hashes the unsigned contents, and only with the account IDs removed.
// This way, the basket will produce a consistent ID across multiple different servers.
void OTBasket::CalculateContractID(OTIdentifier & newID)
{
	const OTString strContents(m_xmlUnsigned);
	
	// Produce a version of the file without account IDs (which are different from server to server.)
	//
	m_bHideAccountID	= true;
	
	UpdateContents();  // <=========
	
	newID.CalculateDigest(m_xmlUnsigned);

	// Put it back the way it was.
	m_bHideAccountID	= false;
//	UpdateContents(); // No need to do this, we already had this string before (above).
	m_xmlUnsigned = strContents; // Here we just set it back again.
}
Example #8
0
void CGUIViewControl::SelectVisibleView(int iViewIndex, CGUIControl *previousView, bool focusToVisibleView)
{
  m_currentView = iViewIndex;
  CGUIControl *pNewView = m_visibleViews[m_currentView];

  // make only current control visible...
  for (ciViews view = m_allViews.begin(); view != m_allViews.end(); view++)
    (*view)->SetVisible(false);
  pNewView->SetVisible(true);

  if (focusToVisibleView)
  {
    // if requested -> set focus to the new view
    CGUIMessage msg(GUI_MSG_SETFOCUS, m_parentWindow, pNewView->GetID(), 0);
    g_windowManager.SendMessage(msg);
  }

  if (pNewView == previousView)
    return; // no need to actually update anything (other than visibility above)

  //  CLog::Log(LOGDEBUG,"SetCurrentView: Oldview: %i, Newview :%i", m_currentView, viewMode);

  int item = -1;
  if (previousView)
  { // have an old view - let's clear it out and hide it.
    item = GetSelectedItem(previousView);
    CGUIMessage msg(GUI_MSG_LABEL_RESET, m_parentWindow, previousView->GetID());
    previousView->OnMessage(msg);
  }

  // Update it with the contents
  UpdateContents(pNewView, item, false);

  // Update our view control
  UpdateViewAsControl(((CGUIBaseContainer *)pNewView)->GetLabel());
}
Example #9
0
void CGUIViewControl::SetCurrentView(int viewMode, bool bRefresh /* = false */)
{
    // grab the previous control
    CGUIControl *previousView = NULL;
    if (m_currentView >= 0 && m_currentView < (int)m_visibleViews.size())
        previousView = m_visibleViews[m_currentView];

    UpdateViewVisibility();

    // viewMode is of the form TYPE << 16 | ID
    VIEW_TYPE type = (VIEW_TYPE)(viewMode >> 16);
    int id = viewMode & 0xffff;

    // first find a view that matches this view, if possible...
    int newView = GetView(type, id);
    if (newView < 0) // no suitable view that matches both id and type, so try just type
        newView = GetView(type, 0);
    if (newView < 0 && type == VIEW_TYPE_BIG_ICON) // try icon view if they want big icon
        newView = GetView(VIEW_TYPE_ICON, 0);
    if (newView < 0 && type == VIEW_TYPE_BIG_INFO)
        newView = GetView(VIEW_TYPE_INFO, 0);
    if (newView < 0) // try a list view
        newView = GetView(VIEW_TYPE_LIST, 0);
    if (newView < 0) // try anything!
        newView = GetView(VIEW_TYPE_NONE, 0);

    if (newView < 0)
        return;

    m_currentView = newView;
    CGUIControl *pNewView = m_visibleViews[m_currentView];

    // make only current control visible...
    for (ciViews view = m_allViews.begin(); view != m_allViews.end(); ++view)
        (*view)->SetVisible(false);
    pNewView->SetVisible(true);

    if (!bRefresh && pNewView == previousView)
        return; // no need to actually update anything (other than visibility above)

//  CLog::Log(LOGDEBUG,"SetCurrentView: Oldview: %i, Newview :%i", m_currentView, viewMode);

    bool hasFocus(false);
    int item = -1;
    if (previousView)
    {   // have an old view - let's clear it out and hide it.
        hasFocus = previousView->HasFocus();
        item = GetSelectedItem(previousView);
        CGUIMessage msg(GUI_MSG_LABEL_RESET, m_parentWindow, previousView->GetID());
        previousView->OnMessage(msg);
    }

    // Update it with the contents
    UpdateContents(pNewView, item);

    // and focus if necessary
    if (hasFocus)
    {
        CGUIMessage msg(GUI_MSG_SETFOCUS, m_parentWindow, pNewView->GetID(), 0);
        g_windowManager.SendMessage(msg, m_parentWindow);
    }

    UpdateViewAsControl(((IGUIContainer *)pNewView)->GetLabel());
}
Example #10
0
 void ResetChannels()
 {
     m_listChannels.SetEmpty();
     UpdateContents();
 }
Example #11
0
 void RemoveChannel(ChatTarget channel)
 {
     m_listChannels.Remove(channel);
     UpdateContents();
 }
Example #12
0
 void AddChannel(ChatTarget channel)
 {
     m_listChannels.PushEnd(channel);
     UpdateContents();
 }
Example #13
0
void DumpPresenter::NotifyProgramChange(const VirtualMachine &vm)
{
	UpdateContents();
}