Beispiel #1
0
void View2DWindow::Load(wxFile& fs)
{
	OpenItem(fs,v2d->scale);
	OpenItem(fs,v2d->center);
	OpenItem(fs,v2d->mirror);
	OpenItem(fs, View2D::bc);
}
BOOL Explorerplusplus::HandleShellMenuItem(LPITEMIDLIST pidlParent,
	const std::list<LPITEMIDLIST> &pidlItemList,DWORD_PTR dwData,TCHAR *szCmd)
{
	FileContextMenuInfo_t *pfcmi = reinterpret_cast<FileContextMenuInfo_t *>(dwData);

	if(StrCmpI(szCmd,_T("open")) == 0)
	{
		/* If ppidl is NULL, open the item specified by pidlParent
		in the current listview. If ppidl is not NULL, open each
		of the items specified in ppidl. */
		if(pidlItemList.size() == 0)
		{
			OpenItem(pidlParent,FALSE,FALSE);
		}
		else
		{
			LPITEMIDLIST pidlComplete = NULL;

			for each(auto pidl in pidlItemList)
			{
				pidlComplete = ILCombine(pidlParent,pidl);

				OpenItem(pidlComplete,FALSE,FALSE);

				CoTaskMemFree(pidlComplete);
			}
		}

		m_bTreeViewOpenInNewTab = TRUE;

		return TRUE;
	}
Beispiel #3
0
void FolderListCtrl::OnDblClick(NMHDR* nmhdr, LRESULT* result)
{
	*result = 0;
	NMITEMACTIVATE* item= reinterpret_cast<NMITEMACTIVATE*>(nmhdr);

	OpenItem(item->iItem);
}
void CDirstatDoc::OnCleanupOpen()
{
	const CItem *item= GetSelection();
	ASSERT(item != NULL);

	OpenItem(item);
}
void CFileBrowserListCtrl::OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult) 
{
	NMLISTVIEW	*nmlv = (NMLISTVIEW *)pNMHDR;
	int	ItemIdx = nmlv->iItem;
	if (ItemIdx >= 0)
		OpenItem(ItemIdx);
	*pResult = 0;
}
/* Called when the user presses 'Enter' while
the address bar has focus, or when the 'Go'
toolbar button to the right of the address
bar is pressed.

The path entered may be relative to the current
directory, or absolute.
Basic procedure:
1. Path is expanded (if possible)
2. Any special character sequences ("..", ".") are removed
3. If the path is a URL, pass it straight out, else
4. If the path is relative, add it onto onto the current directory
*/
void Explorerplusplus::OnAddressBarGo(void)
{
	TCHAR szPath[MAX_PATH];
	TCHAR szFullFilePath[MAX_PATH];
	TCHAR szCurrentDirectory[MAX_PATH];

	/* Retrieve the combobox text, and determine if it is a
	valid path. */
	SendMessage(m_hAddressBar,WM_GETTEXT,SIZEOF_ARRAY(szPath),(LPARAM)szPath);

	m_pActiveShellBrowser->QueryCurrentDirectory(SIZEOF_ARRAY(szCurrentDirectory),szCurrentDirectory);
	DecodePath(szPath,szCurrentDirectory,szFullFilePath,SIZEOF_ARRAY(szFullFilePath));

	OpenItem(szFullFilePath,FALSE,FALSE);
}
STDMETHODIMP CCurrencyConversionSamplePluginContentItem::
    ProcessDetailsViewFeedback(GoogleDesktopDisplayDetailsViewFlags dv_flags) {
  if (dv_flags & GDD_DETAILS_VIEW_FLAG_NEGATIVE_FEEDBACK) {
    CComQIPtr<IGoogleDesktopDisplayContentItemHelper> helper(m_contentItemHelper);
    CComBSTR heading;
    ATLVERIFY(SUCCEEDED(helper->get_heading(&heading)));

    CString str(_T("Not interesting: "));
    str += heading;
    MessageBox(NULL, str, L"", MB_OK);
  }
  if (dv_flags & GDD_DETAILS_VIEW_FLAG_TOOLBAR_OPEN) {
    OpenItem();
  }
  return S_OK;
}
Beispiel #8
0
void PProjectWindow::MessageReceived(BMessage *msg)
{
	if (msg->WasDropped() && msg->HasRef("refs"))
		AddRefs(msg);
	else
		switch (msg->what)
		{
			case msg_PProjectItemInvoked:
				OpenItem();
				break;

			case msg_PProjectItemSelected:
				SelectionChanged();
				break;

			case msg_PAdd:
				AddFiles();
				SetDirty(true);
				break;

			case msg_PRemove:
				RemoveSelected();
				break;

			case B_REFS_RECEIVED:
				AddRefs(msg);
				break;

			case msg_EditAsText:
				if (IsDirty())
					Save();
				gApp->NewWindow(EntryRef());
				Close();
				break;

			default:
				inherited::MessageReceived(msg);
				break;
		}
} /* PProjectWindow::MessageReceived */
void CFileBrowserListCtrl::OpenSelectedItems()
{
	POSITION	pos = GetFirstSelectedItemPosition();
	while (pos != NULL && GetSelectedCount())	// opening a folder clears selection
		OpenItem(GetNextSelectedItem(pos));
}
Beispiel #10
0
ENDDISPATCH

/*	TTreeView::DoKeyEvent
 *
 *		Tree event
 */

long TTreeView::DoKeyEvent(long arg, void *)
{
	TreeEventRecord tevent;
	TableDrawRecord tr;
	short i;
	short mods;
	short key;
	uint32 item;
	
	key = GETLOWORD(arg);
	mods = GETHIWORD(arg);
	
	if (mods & KSpecialKey) {
		/*
		 *	Scan for the various arrow keys
		 */
		
		switch (key) {
			case KKeyUpCursor:
				if (fLength <= 0) return 0;
				for (i = 0; i < fLength; ++i) {
					fDrawList.GetMemory(i*sizeof(tr),sizeof(tr),&tr);
					if (tr.entry->fSelected) {
						--i;
						break;
					}
				}
				if (i >= fLength || i < 0) i = 0;
				fDrawList.GetMemory(i*sizeof(tr),sizeof(tr),&tr);
				if (!(mods & KKeyShift)) {
					ClearSelection();
				}
				SetSelected((uint32)tr.entry,true);
				tevent.child = (uint32)tr.entry;
				DoDispatch(KEventTreeClick,GetViewID(),(void *)&tevent);
				return 0;
			case KKeyDownCursor:
				if (fLength <= 0) return 0;
				for (i = fLength - 1; i >= 0; --i) {
					fDrawList.GetMemory(i*sizeof(tr),sizeof(tr),&tr);
					if (tr.entry->fSelected) {
						++i;
						break;
					}
				}
				if (i >= fLength || i < 0) i = fLength - 1;
				fDrawList.GetMemory(i*sizeof(tr),sizeof(tr),&tr);
				if (!(mods & KKeyShift)) {
					ClearSelection();
				}
				SetSelected((uint32)tr.entry,true);
				tevent.child = (uint32)tr.entry;
				DoDispatch(KEventTreeClick,GetViewID(),(void *)&tevent);
				return 0;
			case KKeyLeftCursor:
				if (fSelectedCount == 1) {
					item = 0;
					if (fSelection->fOpen) {
						item = (uint32)fSelection;
					} else {
						item = (uint32)(fSelection->parent);
					}
					
					if (item) {
						OpenItem( item, false );
						SetSelection( item );
						
						tevent.child = item;
						DoDispatch(KEventTreeClick,GetViewID(),(void *)&tevent);
					}
				}
				return 0;
			case KKeyRightCursor:
				if (fSelectedCount == 1) {
					item = (uint32)(fSelection->child);
					if (item) {
						OpenItem( (uint32)fSelection, true );
						SetSelection( item );
						
						tevent.child = item;
						DoDispatch(KEventTreeClick,GetViewID(),(void *)&tevent);
					}
				}
				return 0;
			default:
				return -1;
		}
	} else {
		/*
		 *	Scan for the regular keys
		 */
		
#if 0
		if (key == 0x0D) {
			/*
			 *	Enter key == double-click
			 */
			
			if (fSelect != NULL) {
				tevent.child = (uint32)fSelect;
				DoDispatch(KEventTreeDoubleClick,GetViewID(),(void *)&tevent);
			}
			return 0;
		} else if (key == ' ') {
			/*
			 *	Space key == open/close item
			 */
			
			if (fSelect) {
				OpenItem((uint32)fSelect,!(fSelect->fOpen));
				return 0;
			}
		}
#endif
		return -1;
	}
}
Beispiel #11
0
void FolderListCtrl::OnKeyDown(UINT chr, UINT rep_cnt, UINT flags)
{
	switch (chr)
	{
	case VK_RETURN:
		ResetSearch();
		{
			POSITION pos= GetFirstSelectedItemPosition();
			int item= GetNextSelectedItem(pos);
			if (item >= 0)
				OpenItem(item);
		}
		return;

	case VK_BACK:
		ResetSearch();
		GoLevelUp();
		return;

	case VK_PRIOR:
		ResetSearch();
		if (::GetKeyState(VK_CONTROL) < 0)
		{
			GoLevelUp();
			return;
		}
		break;

	case VK_TAB:
		ResetSearch();
		if (CWnd* wnd= GetParent())
		{
			bool previous= ::GetKeyState(VK_SHIFT) < 0;
			wnd->SendMessage(WM_NEXTDLGCTL, previous ? 1 : 0, 0L);
			return;
		}
		break;

	case VK_ESCAPE:		// propagate...
		ResetSearch();
		if (CWnd* wnd= GetParent())
		{
			wnd->SendMessage(WM_COMMAND, IDCANCEL, 0);
			return;
		}
		break;

	case VK_LEFT:
	case VK_RIGHT:
	case VK_UP:
	case VK_DOWN:
	case VK_NEXT:
	case VK_HOME:
	case VK_END:
		ResetSearch();
		break;

	default:
		break;
	}

	Default();
}
Beispiel #12
0
void InventoryWindow::CreateActions()
{
    /*
        itemMenu_ = new QMenu(this);
        fileTransferMenu_ = new QMenu(this);
        connect(actionMenu_, SIGNAL(aboutToShow()), this, SLOT(UpdateActions()));
    */
    // File transfer actions
    InventoryAction  *actionUpload= new InventoryAction(tr("&Upload"), treeView_);
    actionUpload->setObjectName("Upload");
    actionUpload->setStatusTip(tr("Upload file to your inventory"));
    connect(actionUpload, SIGNAL(triggered()), this, SLOT(Upload()));
    treeView_->addAction(actionUpload);

    InventoryAction *actionDownload = new InventoryAction(tr("&Download"), treeView_);
    actionDownload->setObjectName("Download");
    actionDownload->setStatusTip(tr("Download assets to your hard drive"));
    connect(actionDownload, SIGNAL(triggered()), this, SLOT(Download()));
    treeView_->addAction(actionDownload);

    // Add separator
    InventoryAction *actionSeparator = new InventoryAction(treeView_);
    actionSeparator->setSeparator(true);
    treeView_->addAction(actionSeparator);

    // Inventory item actions.
    InventoryAction  *actionDelete = new InventoryAction(tr("&Delete"), treeView_);
    actionDelete->setObjectName("Delete");
    //actionDelete_->setShortcuts(QKeySequence::Delete);
    actionDelete->setStatusTip(tr("Delete this item"));
    connect(actionDelete, SIGNAL(triggered()), this, SLOT(DeleteItem()));
    treeView_->addAction(actionDelete);

    InventoryAction *actionRename = new InventoryAction(tr("&Rename"), treeView_);
    actionRename->setObjectName("Rename");
    //actionRename_->setShortcuts();
    actionRename->setStatusTip(tr("Rename this item"));
    connect(actionRename, SIGNAL(triggered()), this, SLOT(RenameItem()));
    treeView_->addAction(actionRename);

    /*
        InventoryAction  *actionCut_ = new InventoryAction(tr("&Cut"), treeView_);
        actionDelete_->setShortcuts(QKeySequence::Cut);
        actionDelete_->setStatusTip(tr("Cut this item"));
        connect(actionCut_, SIGNAL(triggered()), this, SLOT(Test()));
        treeView_->addAction(actionCut_);

        InventoryAction  *actionPaste_ = new InventoryAction(tr("&Paste"), treeView_);
        actionDelete_->setShortcuts(QKeySequence::Paste);
        actionDelete_->setStatusTip(tr("Paste this item"));
        connect(actionPaste_, SIGNAL(triggered()), this, SLOT(Test()));
        treeView_->addAction(actionPaste_);
    */

    InventoryAction  *actionNewFolder = new InventoryAction(tr("&New folder"), treeView_);
    actionNewFolder->setObjectName("NewFolder");
    //actionDelete_->setShortcuts(QKeySequence::Delete);
    actionNewFolder->setStatusTip(tr("Create new folder"));
    connect(actionNewFolder, SIGNAL(triggered()), this, SLOT(AddFolder()));
    treeView_->addAction(actionNewFolder);

    InventoryAction *actionOpen = new InventoryAction(tr("&Open"), treeView_);
    actionOpen->setObjectName("Open");
    //actionDelete_->setShortcuts(QKeySequence::Delete);
    actionOpen->setStatusTip(tr("Open this item"));
    connect(actionOpen, SIGNAL(triggered()), this, SLOT(OpenItem()));
    treeView_->addAction(actionOpen);

    InventoryAction  *actionProperties= new InventoryAction(tr("&Properties"), treeView_);
    actionProperties->setObjectName("Properties");
    //actionProperties_->setShortcuts(QKeySequence::Delete);
    actionProperties->setStatusTip(tr("View item properties"));
    connect(actionProperties, SIGNAL(triggered()), this, SLOT(OpenItemProperties()));
    treeView_->addAction(actionProperties);

    InventoryAction *actionCopyAssetReference = new InventoryAction(tr("&Copy asset reference"), treeView_);
    actionCopyAssetReference->setObjectName("CopyAssetReference");
    //actionDelete_->setShortcuts(QKeySequence::Delete);
    actionCopyAssetReference->setStatusTip(tr("Copies asset reference to clipboard"));
    connect(actionCopyAssetReference, SIGNAL(triggered()), this, SLOT(CopyAssetReference()));
    treeView_->addAction(actionCopyAssetReference);
}
Beispiel #13
0
void Render::Load(wxFile& fs)
{
	OpenItem(fs,b1);
	OpenItem(fs,b2);
	
	OpenItem(fs,LightDir);
	
	OpenItem(fs,step_length);

//
	

	RenderingMethod* tmp;
	//ClearRMs();
	
	int rm_num;
	OpenItem(fs,rm_num);
	for(int k=0;k<rm_num;k++)
	{
		wxString tmp_s;
		OpenString(fs,tmp_s);
		tmp=0;
		for(int i=0;i<rendering_methods.size();i++)
			if(rendering_methods[i]->fs_filename==tmp_s)
			{
				tmp = rendering_methods[i];break;
			}
		if(!tmp)continue;
		OpenString(fs,tmp->caption);
		OpenItem(fs,tmp->size);
		OpenItem(fs,tmp->pos);
	
		OpenItem(fs,tmp->isos_sum);
		OpenItem(fs,tmp->quads_sum);
		for(int i=0;i<MAX_VD_NUMBER;i++)
		{
			OpenItem(fs,tmp->min_level[i]);
			OpenItem(fs,tmp->max_level[i]);
			OpenItem(fs,tmp->opacity[i]);
			OpenVector(fs,tmp->tf_quads[i]);
			tmp->ApplyQuads(i);
			OpenVector(fs,tmp->tf_points[i]);
			OpenVector(fs,tmp->isos[i]);
			tmp->ApplyPoints(i);
			OpenItem(fs,tmp->iso_last[i]);
			OpenItem(fs,tmp->quad_last[i]);
		}
		//rendering_methods.push_back(tmp);
		OpenItem(fs,tmp->use_accel_struct);
		OpenItem(fs,tmp->use_cubic_filt);tmp->use_cubic_filt=0;
		OpenItem(fs,tmp->drop_shadows);
		OpenItem(fs,tmp->shade_mode);
		OpenItem(fs,tmp->tf_type);
		tmp=0;

	}
	OpenItem(fs,CurRM);
	

	SetCurRM(CurRM);



	ReLoadShader();

}