5 #include "../../../idlib/precompiled.h"
11 #include "../../../sys/win32/rc/proptree_Resource.h"
16 static char THIS_FILE[] = __FILE__;
36 ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
37 ON_COMMAND(ID_EDIT_CUT, OnEditCut)
38 ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
39 ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
50 CMenu* pPopupMenu = FloatingMenu.GetSubMenu (0);
53 pPopupMenu->EnableMenuItem(ID_EDIT_UNDO, MF_BYCOMMAND | MF_ENABLED);
55 pPopupMenu->EnableMenuItem(ID_EDIT_UNDO, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
58 DWORD dwSel = GetSel();
59 if(HIWORD(dwSel) != LOWORD(dwSel)) {
60 pPopupMenu->EnableMenuItem(ID_EDIT_CUT, MF_BYCOMMAND | MF_ENABLED);
61 pPopupMenu->EnableMenuItem(ID_EDIT_COPY, MF_BYCOMMAND | MF_ENABLED);
62 pPopupMenu->EnableMenuItem(ID_EDIT_DELETE, MF_BYCOMMAND | MF_ENABLED);
64 pPopupMenu->EnableMenuItem(ID_EDIT_CUT, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
65 pPopupMenu->EnableMenuItem(ID_EDIT_COPY, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
66 pPopupMenu->EnableMenuItem(ID_EDIT_DELETE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
69 pPopupMenu->TrackPopupMenu (TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
this);
74 if (CPropTreeItemEdit::OnCreate(lpCreateStruct) == -1)
83 CFileDialog dlg(
TRUE);
84 dlg.m_ofn.Flags |= OFN_FILEMUSTEXIST;
87 GetSel(startSel, endSel);
89 if( dlg.DoModal()== IDOK) {
98 newText.
Insert(filename, startSel);
afx_msg void OnEditDelete()
afx_msg void OnInsertFile()
idFileSystem * fileSystem
const char * Left(int len, idStr &result) const
idStr & BackSlashesToSlashes(void)
LRESULT SendNotify(UINT nNotifyCode, CPropTreeItem *pItem=NULL)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
virtual LPARAM GetItemValue()
#define ID_EDIT_SELECTALL
virtual void SetItemValue(LPARAM lParam)
afx_msg void OnEditUndo()
virtual ~CPropTreeItemFileEdit()
void Insert(const char a, int index)
const char * Right(int len, idStr &result) const
afx_msg void OnEditCopy()
void RefreshItems(CPropTreeItem *pItem=NULL)
afx_msg void OnEditPaste()
const char * c_str(void) const
virtual const char * OSPathToRelativePath(const char *OSPath)=0
#define ID_EDITMENU_INSERTFILE
afx_msg void OnEditSelectAll()