示例#1
0
void OnMenuProperties(SumatraWindow& win)
{
    if (win.AsWindowInfo())
        ShowProperties(win.AsWindowInfo()->hwndFrame, GetDocForWindow(win), win.AsWindowInfo()->dm);
    else if (win.AsEbookWindow())
        ShowProperties(win.AsEbookWindow()->hwndFrame, GetDocForWindow(win), NULL);
}
示例#2
0
void SeqPhraseMatrixView::MessageReceived(BMessage* msg)
{
    if (TrackMessageReceived(msg) ) return;

    SeqSongWinPropertiesI*		win = dynamic_cast<SeqSongWinPropertiesI*>( Window() );
    _SeqPhraseToolTarget*	target;
    if (win && (target = new _SeqPhraseToolTarget(win, this, &mMtc)) ) {
        track_id	trackId = CurrentTrackId();
        bool		handled = mTool.HandleMessage(msg, trackId, target);
        delete target;
        if (handled) return;
    }

    switch (msg->what) {
    case AmSong::END_TIME_CHANGE_OBS:
        AmTime		endTime;
        if(find_time(*msg, "end_time", &endTime ) == B_OK) {
            mCachedEndTime = endTime;
            SetupScrollBars(true, false);
        }
        break;
    case AmSong::TRACK_CHANGE_OBS:
        TrackChangeReceived(msg);
        break;
    case AmTrack::MODE_CHANGE_OBS: {
        BRect			invalid = arp_invalid_rect();
        track_id		tid;
        BRect			b(Bounds() );
        for (uint32 k = 0; msg->FindPointer(SZ_TRACK_ID, k, & tid) == B_OK; k++) {
            _SeqTrackMetric*	metric = TrackMetric(tid);
            if (metric) {
                BRect	r(b.left, metric->mTop, b.right, metric->mBottom);
                invalid = arp_merge_rects(invalid, r);
            }
        }
        if (arp_is_valid_rect(invalid) ) Invalidate(invalid);
    }
    break;
    case SHOW_POPUP_MSG:
        if (mDownTime >= 0) {
            StopPopUpTimer();
            ShowPopUp();
            mDownTime = -1;
        }
        break;
    case PROPERTIES_MSG: {
        BPoint		where;
        if (msg->FindPoint(WHERE_STR, &where) == B_OK)
            ShowProperties(where);
    }
    break;
    default:
        inherited::MessageReceived(msg);
        break;
    }
}
示例#3
0
void RegTreeCtrl::OnChar(wxKeyEvent& event)
{
    switch ( event.GetKeyCode() )
    {
    case WXK_DELETE:
        DeleteSelected();
        return;

    case WXK_RETURN:
        if ( event.AltDown() )
        {
            ShowProperties();

            return;
        }
    }

    event.Skip();
}
示例#4
0
// PropertiesWindow::InitWindow -- Initialization Commands here
void PropertiesWindow::InitWindow(void)
{
	BRect r;
	r = Bounds();
    // Add Controls
    
    lsvProperties = new BListView(BRect(6,6,r.right-6,r.bottom-6), "lsvProperties",
					  B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP,
					  B_WILL_DRAW | B_NAVIGABLE | B_FRAME_EVENTS);

	// Add the Drawing View
	AddChild(ptrPropertiesWindowView = new PropertiesWindowView(r));
	ptrPropertiesWindowView->AddChild(lsvProperties);
	
	if (ProjectName.Length() == 0)
	{
		ProjectName.SetTo("Untitled");
	}
	ShowProperties("Window",ProjectName.String());
}
示例#5
0
void WorldWindow::AgentOptions(void) {
	QDockWidget *dock = new QDockWidget(tr("Agent Options"), this);
	addDockWidget(Qt::LeftDockWidgetArea, dock);

	QGroupBox *options = new QGroupBox(dock);
	QVBoxLayout * vbox = new QVBoxLayout;
	options->setLayout(vbox);
	dock->setWidget(options);

	QGroupBox *prop_group = new QGroupBox(options);
	vbox->addWidget(prop_group);
	QHBoxLayout * hbox = new QHBoxLayout;
	prop_group->setLayout(hbox);
	AgentList * property_agents = new AgentList(options);
	hbox->addWidget(property_agents);
	AgentListButton * prop_btn = new AgentListButton(tr("Show &Properties"), prop_group, property_agents);
	hbox->addWidget(prop_btn);
	connect(prop_btn, SIGNAL(clicked()), this, SLOT(ShowProperties()));

	vbox->addStretch();

}
示例#6
0
static void PropertiesOnCommand(HWND hwnd, WPARAM wParam)
{
    switch (LOWORD(wParam)) {
    case IDM_COPY_SELECTION:
        CopyPropertiesToClipboard(hwnd);
        break;

    case IDM_PROPERTIES:
#if defined(DEBUG) || defined(ENABLE_EXTENDED_PROPERTIES)
        // make a repeated Ctrl+D display some extended properties
        // TODO: expose this through a UI button or similar
        PropertiesLayout *pl = FindPropertyWindowByHwnd(hwnd);
        if (pl) {
            WindowInfo *win = FindWindowInfoByHwnd(pl->hwndParent);
            if (win && !pl->HasProperty(_TR("Fonts:"))) {
                DestroyWindow(hwnd);
                ShowProperties(win->hwndFrame, GetDocForWindow(SumatraWindow::Make(win)), win->dm, true);
            }
        }
#endif
        break;
    }
}
BOOL CDiagramEntity::DoMessage( UINT msg, CDiagramEntity* /*sender*/, CWnd* from )
/* ============================================================
	Function :		CDiagramEntity::DoMessage
	Description :	Message handler for the object.

	Return :		BOOL					-	TRUE to stop 
												further processing.
	Parameters :	UINT msg				-	The message.
					CDiagramEntity* sender	-	Original sender of 
												this message, or 
												NULL if not an object.

	Usage :			The container can send messages to all 
					objects. The messages should lie in the 
					range CMD_START to CMD_STOP inclusively - 
					a few are already predefined in 
					DiagramEntity.h. This function will be 
					called as response to those messages. This 
					mechanism is already used for sending back 
					messages from CDiagramEditor to the 
					relevant object when a object popup menu 
					alternative is selected.

   ============================================================*/
{

	BOOL stop = FALSE;
	switch( msg )
	{
		case CMD_CUT:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Cut( this );
			}
		break;

		case CMD_COPY:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Copy( this );
			}
		break;

		case CMD_UP:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Up( this );
			}
		break;

		case CMD_DOWN:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Down( this );
			}
		break;

		case CMD_FRONT:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Front( this );
			}
		break;

		case CMD_BOTTOM:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Bottom( this );
			}
		break;

		case CMD_DUPLICATE:
			if( m_parent && IsSelected() )
			{
				stop = TRUE;
				m_parent->Duplicate( this );
				Select( FALSE );
			}
		break;

		case CMD_PROPERTIES:
			if( IsSelected() )
			{
				ShowProperties( from ); // MOD
				stop = TRUE;
			}
		break;

		case CMD_FREEZE:
			if( IsSelected() )
			{
				stop = FALSE;
				Freeze(TRUE);
			}
		break;

		case CMD_UNFREEZE_ALL:
			if( IsFreezed() )
			{
				stop = FALSE;
				Freeze(FALSE);
			}
		break;

		case CMD_HIDE:
			if( IsSelected() )
			{
				stop = FALSE;
				SetVisible(FALSE);
			}
		break;

		case CMD_HIDE_UNSEL:
			if( !IsSelected() )
			{
				stop = FALSE;
				SetVisible(FALSE);
			}
		break;

		case CMD_UNHIDE_ALL:
			if( !IsVisible() )
			{
				stop = FALSE;
				SetVisible(TRUE);
			}
		break;
	}

	return stop;

}
示例#8
0
    void UObjectHelper::ShowProperties( Network::Client* client, UObject* obj )
	{
	  ShowProperties( client, obj->proplist_ );
	}
示例#9
0
void OnMenuProperties(WindowInfo *win)
{
    ShowProperties(win->hwndFrame, win->ctrl);
}
示例#10
0
void CFilterProp::OnDblclkListFilters() 
{
	ShowProperties();	
}
示例#11
0
void CFilterProp::OnButtonProp() 
{
	ShowProperties();	
}
示例#12
0
void CTreeFileCtrl::OnFileProperties() 
{
  ShowProperties(GetSelectedItem());
}