/**************************************************************************

    This file is part of explorer95, a file manager for fvwm95.
    Copyright (C) 1996, 1997 David Barth, Hector Peraza.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

**************************************************************************/

#ifndef __OXPROPERTIES_H
#define __OXPROPERTIES_H


#include <xclass/OXClient.h>
#include <xclass/OXWindow.h>
#include <xclass/OXFrame.h>
#include <xclass/OXWidgets.h>
#include <xclass/OString.h>
#include <xclass/OPicture.h>
#include <xclass/utils.h>


//---------------------------------------------------------------------

class OX2ColumnsFrame : public OXCompositeFrame {
public:
  OX2ColumnsFrame(const OXWindow *p, int w, int h,
                  unsigned long options = CHILD_FRAME) :
    OXCompositeFrame(p, w, h, options) {}

  virtual void Layout();
  virtual ODimension GetDefaultSize() const;

protected:
  int _x1, _x2;
};

class OXPropertiesDialog : public OXTransientFrame {
public:
  OXPropertiesDialog(const OXWindow *p, const OXWindow *main,
                     OString *filename, int type, int is_link,
                     unsigned long options = MAIN_FRAME | VERTICAL_FRAME);
  virtual ~OXPropertiesDialog();

  virtual void CloseWindow();
  virtual int ProcessMessage(long msg, long parm1, long parm2);

  void InitControls();
  void ApplyProperties();

protected:
  OString *_filename;
  int _type, _is_link;

  //--- "OK Cancel Apply" buttons:
  OXButton *Ok, *Cancel, *Apply;
  OXHorizontalFrame *bframe;
  OLayoutHints *bly, *bfly;

  OXTab *tab;
  OLayoutHints *Ltab;

  //--- Tab 1
  OXVerticalFrame *vf1;
  OXHorizontalFrame *hf1;
  OXFileIcon *FileIcon;
  OTextBuffer *bfr1;
  OXTextEntry *FileName;
  OX2ColumnsFrame *d1, *d2;
  OXHorizontal3dLine *ln1, *ln2; 
  // file description and misc controls
  OXLabel *ltype0, *ltype;  // file type
  OXLabel *ldev0,  *ldev;   // device
  OXLabel *lusr0,  *lusr;   // owner
  OXLabel *lgrp0,  *lgrp;   // group
  OXLabel *llnks0, *llnks;  // hard links
  OXLabel *lsz0,   *lsz;    // file size
  OXLabel *lacc0,  *lacc;   // last access
  OXLabel *lmod0,  *lmod;   // last modification
  OLayoutHints *Vly, *lhf1, *Tly, *Ily, *Lr, *Lc;

  //--- Tab 2
  OXVerticalFrame *vf2;
  OXHorizontalFrame *hf2;
  OXLabel *laccp;
  // access permission controls
  OXGroupFrame *umode, *gmode, *omode;
  OXCheckButton *ur, *uw, *ux,
                *gr, *gw, *gx,
                *or, *ow, *ox,
                *sticky, *suid, *sgid;
  OLayoutHints *Lc1, *Lg, *Ls;
};


#endif  // __OXPROPERTIES_H
