|
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
|
00001 /********************************************************************************
00002 * FXNetworkSelectorEx.h *
00003 * Copyright (C) 2001 by Dustin Graves. All Rights Reserved. *
00004 *********************************************************************************
00005 * This library is free software; you can redistribute it and/or *
00006 * modify it under the terms of the GNU Lesser General Public *
00007 * License as published by the Free Software Foundation; either *
00008 * version 2.1 of the License, or (at your option) any later version. *
00009 * *
00010 * This library is distributed in the hope that it will be useful, *
00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
00013 * Lesser General Public License for more details. *
00014 * *
00015 * You should have received a copy of the GNU Lesser General Public *
00016 * License along with this library; if not, write to the Free Software *
00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
00018 ********************************************************************************/
00019 #ifdef WIN32
00020 #ifndef FXNETWORKSELECTOREX_H
00021 #define FXNETWORKSELECTOREX_H
00022
00023 #ifndef FXPACKER_H
00024 #include <fox/FXPacker.h>
00025 using namespace FX;
00026 #endif
00027 namespace FXEX {
00028 class FXNetworkListEx;
00029
00030 /**
00031 * List network shares, using a selector box
00032 */
00033 class FXAPI FXNetworkSelectorEx : public FXPacker {
00034 FXDECLARE(FXNetworkSelectorEx)
00035
00036 protected:
00037 FXLabel *label; // Description
00038 FXNetworkListEx *netbox; // Network list widget
00039 FXButton *accept; // Accept button
00040 FXButton *cancel; // Cancel button
00041
00042 protected:
00043 // serialization
00044 FXNetworkSelectorEx() : FXPacker() {}
00045
00046 private:
00047 FXNetworkSelectorEx(const FXNetworkSelectorEx&);
00048 FXNetworkSelectorEx &operator=(const FXNetworkSelectorEx&);
00049
00050 public:
00051 long onUpdNetList(FXObject*,FXSelector,void*);
00052
00053 public:
00054 enum {
00055 ID_NETLIST=FXPacker::ID_LAST,
00056 ID_LAST
00057 };
00058
00059 public:
00060 // ctor
00061 FXNetworkSelectorEx(FXComposite *p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00062
00063 /// returns pointers to those objects
00064 FXLabel *listLabel() const { return label; }
00065 FXButton *acceptButton() const { return accept; }
00066 FXButton *cancelButton() const { return cancel; }
00067
00068 //When called, will relist net neighborhood. A wait cursor is optional.
00069 FXbool refreshNetworkList(FXbool waitCursor=FALSE);
00070
00071 //When called, option to relist net neighborhood. A wait cursor is optional.
00072 void showNetworkShares(FXbool show,FXbool refresh=FALSE,FXbool waitCursor=FALSE);
00073 FXbool showNetworkShares() const;
00074
00075 /// manipulate the currently selected item
00076 void setSelection(const FXString& name);
00077 FXString getSelection() const;
00078
00079 /// get the 'Network' names
00080 FXString getNetworkName(const FXString& name) const;
00081 FXString getSelectionNetworkName() const;
00082
00083 /// manipulate the style of the Network box
00084 void setNetBoxStyle(FXuint style);
00085 FXuint getNetBoxStyle() const;
00086
00087 /// save to stream
00088 virtual void save(FXStream& store) const;
00089
00090 /// load from stream
00091 virtual void load(FXStream& store);
00092
00093 /// dtor
00094 virtual ~FXNetworkSelectorEx();
00095 };
00096
00097 } // namespace FXEX
00098 #endif // FXNETWORKSELECTOREX_H
00099 #endif
00100