コード例 #1
0
ファイル: OpWindowList.cpp プロジェクト: prestocore/browser
OpWindowList::OpWindowList()
	: m_detailed(FALSE)
{
	SetTreeModel(g_application->GetWindowList());
	SetShowThreadImage(TRUE);
	SetMultiselectable(TRUE);
	SetListener(this);
	SetMatchType(MATCH_STANDARD);

	SetDetailed(FALSE, TRUE);

	if(g_pcui->GetIntegerPref(PrefsCollectionUI::EnableDrag)&DRAG_BOOKMARK)
	{
		SetDragEnabled(TRUE);
	}

	// Hardcoded - not good but better than nothing.
	SetAction(OP_NEW(OpInputAction, (OpInputAction::ACTION_ACTIVATE_WINDOW)));

	SetSelectedItem(0);

	GetBorderSkin()->SetImage("Panel Treeview Skin", "Treeview Skin");
}
コード例 #2
0
ファイル: propertysheet.cpp プロジェクト: Bubbasacs/FinalProj
	PageTab(PropertySheet *parent, const char *panelName, const char *text, char const *imageName, int maxTabWidth, Panel *page, bool showContextButton ) : 
		Button( (Panel *)parent, panelName, text),
		m_pParent( parent ),
		m_pPage( page ),
		m_pImage( 0 ),
		m_pszImageName( 0 ),
		m_bShowContextLabel( showContextButton )
	{
		SetCommand(new KeyValues("TabPressed"));
		_active = false;
		m_bMaxTabWidth = maxTabWidth;
		SetDropEnabled( true );
		SetDragEnabled( m_pParent->IsDraggableTab() );
		if ( imageName )
		{
			m_pImage = new ImagePanel( this, text );
			int buflen = Q_strlen( imageName ) + 1;
			m_pszImageName = new char[ buflen ];
			Q_strncpy( m_pszImageName, imageName, buflen );

		}
		SetMouseClickEnabled( MOUSE_RIGHT, true );
		m_pContextLabel = m_bShowContextLabel ? new ContextLabel( this, "Context", "9" ) : NULL;
	}