00001 #ifndef __REMOTEICONVIEW_H__
00002 #define __REMOTEICONVIEW_H__
00003
00004 #include <gui/iconview.h>
00005 #include <util/datetime.h>
00006 #include <gui/image.h>
00007 #include <gui/bitmap.h>
00008 #include <gui/stringview.h>
00009
00010 #include <vector>
00011
00012 #include "messages.h"
00013 #include "remotenode.h"
00014
00015 using namespace os;
00016
00017 class Server;
00018
00019
00023 class RemoteIconData : public IconData {
00024 public:
00025 RemoteNode m_cNode;
00026 };
00027
00036 class RemoteIconView : public IconView
00037 {
00038 public:
00039 RemoteIconView( const Rect& cFrame, const String& zName );
00040 ~RemoteIconView();
00041
00042 void SetServer( Server* pcServer );
00043 Server* GetServer();
00044 void SetPath( const String& zPath );
00045 String GetPath();
00046 void ShowMessage( const String& zMsg );
00047 void HideMessage();
00048
00049 void Update();
00050 void SetContents( std::vector< RemoteNode >* pacContents, bool bInitial, bool bFinal );
00051 Image* GetNodeImage( RemoteNode* pcNode, bool bSmall );
00052
00053
00054
00055 void AttachedToWindow();
00056 void SetDirChangeMsg( Message* pcMsg );
00057 void Invoked( uint nIcon, IconData* pcData );
00058 void MouseUp( const Point& cPoint, uint32 nButtons, Message* pcData );
00059 void KeyDown( const char* pzString, const char* pzRawString, uint32 nQualifiers );
00060
00061 void DragSelection( Point cStartPoint );
00062 void OpenContextMenu( Point cPosition, bool bMouseOverIcon );
00063
00064 void HandleMessage( Message* pcMessage );
00065
00066 private:
00067
00072 Server* m_pcServer;
00073
00076 String m_zPath;
00077
00081 bool m_bUpdatePending;
00082
00087 int m_nUpdateCookie;
00088
00090 Message* m_pcDirChangedMsg;
00091
00092
00093
00096 Menu* m_pcFileContextMenu;
00099 Menu* m_pcDirContextMenu;
00100 };
00101
00102
00103 #endif
00104