NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeReDropTarget Class Reference

#include <numeredroptarget.hpp>

Inheritance diagram for NumeReDropTarget:
Collaboration diagram for NumeReDropTarget:

Public Types

enum  parentType { NUMEREWINDOW , EDITOR , FILETREE , CONSOLE }
 
enum  fileType {
  NOEXTENSION , TEXTFILE , BINARYFILE , IMAGEFILE ,
  EXECUTABLE , NOTSUPPORTED
}
 

Public Member Functions

 NumeReDropTarget (wxWindow *topwindow, wxWindow *owner, parentType type)
 Constructor. Initializes the data objects, which correspond to the assigned wxWindow. More...
 
wxDragResult OnDragOver (wxCoord x, wxCoord y, wxDragResult defaultDragResult)
 This method visualizes the DragDrop effect. More...
 
wxDragResult OnData (wxCoord x, wxCoord y, wxDragResult defaultDragResult)
 This method handles the file operations after DragDrop. More...
 
fileType getFileType (const wxString &filename)
 This method classifies the file type of the passed file type. More...
 

Private Attributes

wxWindow * m_owner
 
wxWindow * m_topWindow
 
parentType m_type
 

Detailed Description

Definition at line 28 of file numeredroptarget.hpp.

Member Enumeration Documentation

◆ fileType

Enumerator
NOEXTENSION 
TEXTFILE 
BINARYFILE 
IMAGEFILE 
EXECUTABLE 
NOTSUPPORTED 

Definition at line 32 of file numeredroptarget.hpp.

◆ parentType

Enumerator
NUMEREWINDOW 
EDITOR 
FILETREE 
CONSOLE 

Definition at line 31 of file numeredroptarget.hpp.

Constructor & Destructor Documentation

◆ NumeReDropTarget()

NumeReDropTarget::NumeReDropTarget ( wxWindow *  topwindow,
wxWindow *  owner,
parentType  type 
)

Constructor. Initializes the data objects, which correspond to the assigned wxWindow.

Parameters
topwindowwxWindow*
ownerwxWindow*
typeparentType

Definition at line 43 of file numeredroptarget.cpp.

References CONSOLE, and EDITOR.

Member Function Documentation

◆ getFileType()

NumeReDropTarget::fileType NumeReDropTarget::getFileType ( const wxString &  filename)

This method classifies the file type of the passed file type.

Parameters
filenameconst wxString&
Returns
NumeReDropTarget::fileType

Definition at line 457 of file numeredroptarget.cpp.

References BINARYFILE, EXECUTABLE, IMAGEFILE, NOEXTENSION, NOTSUPPORTED, and TEXTFILE.

Referenced by OnData().

◆ OnData()

wxDragResult NumeReDropTarget::OnData ( wxCoord  x,
wxCoord  y,
wxDragResult  defaultDragResult 
)

◆ OnDragOver()

wxDragResult NumeReDropTarget::OnDragOver ( wxCoord  x,
wxCoord  y,
wxDragResult  defaultDragResult 
)

This method visualizes the DragDrop effect.

Parameters
xwxCoord
ywxCoord
defaultDragResultwxDragResult
Returns
wxDragResult

It calls the corresponding UI functions, which visualize the cursor position in the editor or the file tree. This function is called from the DragDrop handler automatically.

Definition at line 70 of file numeredroptarget.cpp.

References EDITOR, FILETREE, date::format(), m_owner, m_type, and FileTree::SetDnDHighlight().

Here is the call graph for this function:

Member Data Documentation

◆ m_owner

wxWindow* NumeReDropTarget::m_owner
private

Definition at line 41 of file numeredroptarget.hpp.

Referenced by OnData(), and OnDragOver().

◆ m_topWindow

wxWindow* NumeReDropTarget::m_topWindow
private

Definition at line 42 of file numeredroptarget.hpp.

Referenced by OnData().

◆ m_type

parentType NumeReDropTarget::m_type
private

Definition at line 43 of file numeredroptarget.hpp.

Referenced by OnData(), and OnDragOver().


The documentation for this class was generated from the following files: