[Fxruby-commits] CVS: FXRuby/fox-includes FXBzStream.h,NONE,1.1 FXGradientBar.h,NONE,1.1 FXGzStream.
Status: Inactive
Brought to you by:
lyle
Update of /cvsroot/fxruby/FXRuby/fox-includes
In directory usw-pr-cvs1:/tmp/cvs-serv26134
Added Files:
FXBzStream.h FXGradientBar.h FXGzStream.h FXImageFrame.h
FXMenuBar.h FXRuler.h FXScrollBar.h FXStatusBar.h
FXStatusLine.h FXToolBar.h FXToolBarGrip.h FXToolBarShell.h
FXToolBarTab.h FXToolTip.h FXWizard.h
Removed Files:
FXMenubar.h FXScrollbar.h FXStatusbar.h FXToolbar.h
FXToolbarGrip.h FXToolbarShell.h FXToolbarTab.h FXTooltip.h
Log Message:
New and removed header files for fox-1.1.13.
--- NEW FILE: FXBzStream.h ---
/********************************************************************************
* *
* B Z S t r e a m C l a s s e s *
* *
*********************************************************************************
* Copyright (C) 1999, 2002 by Lyle Johnson. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXBzStream.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifdef HAVE_BZ2LIB_H
#ifndef FXBZSTREAM_H
#define FXBZSTREAM_H
#ifndef FXSTREAM_H
#include "FXStream.h"
#endif
namespace FX {
/// BZIP2 compressed file stream
class FXAPI FXBzFileStream : public FXStream {
void *file;
void *bzfile;
protected:
virtual void saveItems(const void *buf,unsigned long n);
virtual void loadItems(void *buf,unsigned long n);
public:
/// Create BZIP2 file stream
FXBzFileStream(const FXObject* cont=NULL);
/// Open file stream
FXbool open(const char* filename,FXStreamDirection save_or_load);
/// Close file stream
FXbool close();
/// Move to position
virtual FXbool position(unsigned long p){ return FALSE; }
/// Clean up
virtual ~FXBzFileStream();
};
/// BZIP2 compressed memory stream
class FXAPI FXBzMemoryStream : public FXStream {
private:
void *strm;
unsigned long bzpos;
FXuchar *ptr;
FXuint space;
FXbool owns;
protected:
virtual void saveItems(const void *buf, unsigned long n);
virtual void loadItems(void *buf, unsigned long n);
void finish();
public:
/// Create memory stream
FXBzMemoryStream(const FXObject* cont=NULL);
/// Open store
FXbool open(FXuchar* data, FXStreamDirection);
/// Open stream with specified size
FXbool open(FXuchar* data, FXuint sp, FXStreamDirection);
// Get available space
unsigned long getSpace() const { return space; }
/// Set available space
void setSpace(unsigned long sp);
/// Take buffer away from stream
void takeBuffer(FXuchar*& buffer,unsigned long& sp);
/// Give buffer to stream
void giveBuffer(FXuchar *buffer,unsigned long sp);
/// Move to position
virtual FXbool position(unsigned long p) { return FALSE; }
/// Get final size of compressed stream
unsigned long getCompressedSize() const { return bzpos; }
/// Close
FXbool close();
/// Destructor
virtual ~FXBzMemoryStream();
};
}
#endif
#endif
--- NEW FILE: FXGradientBar.h ---
/********************************************************************************
* *
* G r a d i e n t B a r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXGradientBar.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXGRADIENTBAR_H
#define FXGRADIENTBAR_H
#ifndef FXFRAME_H
#include "FXFrame.h"
#endif
namespace FX {
/// Gradient bar orientation
enum {
GRADIENTBAR_HORIZONTAL = 0, /// Gradient bar shown horizontally
GRADIENTBAR_VERTICAL = 0x00008000, /// Gradient bar shown vertically
GRADIENTBAR_NO_CONTROLS = 0, /// No controls shown
GRADIENTBAR_CONTROLS_TOP = 0x00010000, /// Controls on top
GRADIENTBAR_CONTROLS_BOTTOM = 0x00020000, /// Controls on bottom
GRADIENTBAR_CONTROLS_LEFT = GRADIENTBAR_CONTROLS_TOP, /// Controls on left
GRADIENTBAR_CONTROLS_RIGHT = GRADIENTBAR_CONTROLS_BOTTOM /// Controls on right
};
/// Blend modes
enum {
GRADIENT_BLEND_LINEAR, /// Linear blend
GRADIENT_BLEND_POWER, /// Power law blend
GRADIENT_BLEND_SINE, /// Sine blend
GRADIENT_BLEND_INCREASING, /// Quadratic increasing blend
GRADIENT_BLEND_DECREASING /// Quadratic decreasing blend
};
// Gradient segment
struct FXGradient {
FXdouble lower; /// Lower value
FXdouble middle; /// Middle value
FXdouble upper; /// Upper value
FXColor lowerColor; /// Lower color
FXColor upperColor; /// Upper color
FXuchar blend; /// Blend method
};
class FXImage;
/**
* The gradient bar is a control that is used to edit color gradient,
* such as used in texture mapping and shape filling.
*/
class FXGradientBar : public FXFrame {
FXDECLARE(FXGradientBar)
protected:
FXImage *bar; // Image containing colors
FXGradient *seg; // Segments
FXint nsegs; // Number of segments
FXint sellower; // Lower selected segment
FXint selupper; // Upper selected segment
FXint dropped; // Dropped segment
FXint current; // Current segment
FXint anchor; // Anchor segment
FXint grip; // Grip being dragged, if any
FXint where; // Where dropped in segment
FXString tip; // Tooltip value
FXString help; // Help value
FXColor selectColor; // Select color
FXint offset; // Offset
protected:
FXGradientBar();
void updatebar();
virtual void layout();
FXdouble getValue(FXint x,FXint y) const;
FXint getSegmentLowerPos(FXint sg) const;
FXint getSegmentUpperPos(FXint sg) const;
FXint getSegmentMiddlePos(FXint sg) const;
void drawUpArrow(FXDCWindow& dc,FXint x,FXint y,FXColor clr);
void drawDnArrow(FXDCWindow& dc,FXint x,FXint y,FXColor clr);
void drawRtArrow(FXDCWindow& dc,FXint x,FXint y,FXColor clr);
void drawLtArrow(FXDCWindow& dc,FXint x,FXint y,FXColor clr);
void drawBottomArrows(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawTopArrows(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawLeftArrows(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawRightArrows(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
static FXdouble blendlinear(FXdouble middle,FXdouble pos);
static FXdouble blendpower(FXdouble middle,FXdouble pos);
static FXdouble blendsine(FXdouble middle,FXdouble pos);
static FXdouble blendincreasing(FXdouble middle,FXdouble pos);
static FXdouble blenddecreasing(FXdouble middle,FXdouble pos);
protected:
enum {
GRIP_NONE,
GRIP_LOWER,
GRIP_SEG_LOWER,
GRIP_MIDDLE,
GRIP_SEG_UPPER,
GRIP_UPPER
};
private:
FXGradientBar(const FXGradientBar&);
FXGradientBar &operator=(const FXGradientBar&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onLeftBtnPress(FXObject*,FXSelector,void*);
long onLeftBtnRelease(FXObject*,FXSelector,void*);
long onMotion(FXObject*,FXSelector,void*);
long onDNDEnter(FXObject*,FXSelector,void*);
long onDNDLeave(FXObject*,FXSelector,void*);
long onDNDMotion(FXObject*,FXSelector,void*);
long onDNDDrop(FXObject*,FXSelector,void*);
long onQueryHelp(FXObject*,FXSelector,void*);
long onQueryTip(FXObject*,FXSelector,void*);
long onCmdBlending(FXObject*,FXSelector,void*);
long onUpdBlending(FXObject*,FXSelector,void*);
long onUpdSegColor(FXObject*,FXSelector,void*);
long onCmdSegColor(FXObject*,FXSelector,void*);
long onUpdRecenter(FXObject*,FXSelector,void*);
long onCmdRecenter(FXObject*,FXSelector,void*);
long onUpdSplit(FXObject*,FXSelector,void*);
long onCmdSplit(FXObject*,FXSelector,void*);
long onUpdMerge(FXObject*,FXSelector,void*);
long onCmdMerge(FXObject*,FXSelector,void*);
long onUpdUniform(FXObject*,FXSelector,void*);
long onCmdUniform(FXObject*,FXSelector,void*);
public:
enum{
ID_LOWER_COLOR=FXFrame::ID_LAST,
ID_UPPER_COLOR,
ID_BLEND_LINEAR,
ID_BLEND_POWER,
ID_BLEND_SINE,
ID_BLEND_INCREASING,
ID_BLEND_DECREASING,
ID_RECENTER,
ID_SPLIT,
ID_MERGE,
ID_UNIFORM,
ID_LAST
};
public:
/// Construct a gradient bar
FXGradientBar(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=FRAME_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
/// Create server-side resources
virtual void create();
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Obtain segment containing location x, y
FXint getSegment(FXint x,FXint y) const;
/// Get the grip in segment sg which is closest to location x, y
FXint getGrip(FXint sg,FXint x,FXint y) const;
/// Return the number of segments
FXint geNumSegments() const { return nsegs; }
/// Change several the gradient segments
void setGradients(const FXGradient *segments,FXint nsegments);
/// Return the gradient segments
void getGradients(FXGradient*& segments,FXint& nsegments) const;
/// Change current segment
void setCurrentSegment(FXint index,FXbool notify=FALSE);
/// Return current segment, if any
FXint getCurrentSegment() const { return current; }
/// Change anchor segment
void setAnchorSegment(FXint index);
/// Return anchor segment, if any
FXint getAnchorSegment() const { return anchor; }
/// Select segment
FXbool selectSegments(FXint fm,FXint to,FXbool notify=FALSE);
// Deselect all segments
FXbool deselectSegments(FXbool notify);
/// Is segment selected
FXbool isSegmentSelected(FXint s) const;
/// Set colors of a segment
void setSegmentLowerColor(FXint s,FXColor clr,FXbool notify=FALSE);
void setSegmentUpperColor(FXint s,FXColor clr,FXbool notify=FALSE);
/// Get colors of a segment
FXColor getSegmentLowerColor(FXint s) const;
FXColor getSegmentUpperColor(FXint s) const;
/// Move lower point of segment sg
void moveSegmentLower(FXint sg,FXdouble val,FXbool notify=FALSE);
/// Move middle point of segment sg
void moveSegmentMiddle(FXint sg,FXdouble val,FXbool notify=FALSE);
/// Move upper point of segment sg
void moveSegmentUpper(FXint sg,FXdouble val,FXbool notify=FALSE);
/// Move segments sglo to sghi to new position val
void moveSegments(FXint sglo,FXint sghi,FXdouble val,FXbool notify=FALSE);
/// Get values of segment sg
FXdouble getSegmentLower(FXint sg) const;
FXdouble getSegmentMiddle(FXint sg) const;
FXdouble getSegmentUpper(FXint sg) const;
/// Get gradient ramp
void gradient(FXColor *ramp,FXint nramp);
/// Get blend cuve of segment
FXuint getSegmentBlend(FXint s) const;
/// Split segment at the midpoint
void splitSegments(FXint sglo,FXint sghi,FXbool notify=FALSE);
/// Merge segments
void mergeSegments(FXint sglo,FXint sghi,FXbool notify=FALSE);
/// Make segments uniformly distributed
void uniformSegments(FXint sglo,FXint sghi,FXbool notify=FALSE);
/// Change blend curve of segment
void blendSegments(FXint sglo,FXint sghi,FXuint blend=GRADIENT_BLEND_LINEAR,FXbool notify=FALSE);
/// Change the gradient bar style
FXuint getBarStyle() const;
/// Get the gradient bar style
void setBarStyle(FXuint style);
/// Set color
void setSelectColor(FXColor clr);
/// Get color
FXColor getSelectColor() const { return selectColor; }
/// Set status line help text for this gradient bar
void setHelpText(const FXString& text){ help=text; }
/// Get status line help text for this gradient bar
FXString getHelpText() const { return help; }
/// Set tool tip message for this gradient bar
void setTipText(const FXString& text){ tip=text; }
/// Get tool tip message for this gradient bar
FXString getTipText() const { return tip; }
/// Save gradient bar to a stream
virtual void save(FXStream& store) const;
/// Load gradient bar from a stream
virtual void load(FXStream& store);
virtual ~FXGradientBar();
};
}
#endif
--- NEW FILE: FXGzStream.h ---
/********************************************************************************
* *
* G Z S t r e a m C l a s s e s *
* *
*********************************************************************************
* Copyright (C) 2002 by Sander Jansen. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXGzStream.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifdef HAVE_ZLIB_H
#ifndef FXGZSTREAM_H
#define FXGZSTREAM_H
#ifndef FXSTREAM_H
#include "FXStream.h"
#endif
////////////////////////////// UNDER DEVELOPMENT //////////////////////////////
namespace FX {
/// GZIP compressed stream
class FXAPI FXGzFileStream : public FXStream {
void *gzfile;
protected:
virtual void saveItems(const void *buf,unsigned long n);
virtual void loadItems(void *buf,unsigned long n);
public:
/// Create GZIP compressed file stream
FXGzFileStream(const FXObject* cont=NULL);
/// Open file stream
FXbool open(const char* filename,FXStreamDirection save_or_load);
/// Close file stream
FXbool close();
/// Move to position
virtual FXbool position(unsigned long p){ return FALSE; }
/// Clean up
virtual ~FXGzFileStream();
};
}
#endif
#endif
--- NEW FILE: FXImageFrame.h ---
/********************************************************************************
* *
* I m a g e F r a m e W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2001,2002 by H. J. Daniel III. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXImageFrame.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXIMAGEFRAME_H
#define FXIMAGEFRAME_H
#ifndef FXFRAME_H
#include "FXFrame.h"
#endif
namespace FX {
/**
* The image frame is a simple frame widget displaying
* an image; the image is not owned by the image frame so
* it must be explicitly deleted elsewhere.
*/
class FXImageFrame : public FXFrame {
FXDECLARE(FXImageFrame)
protected:
FXImage* image; // The image being displayed
protected:
FXImageFrame();
private:
FXImageFrame(const FXImageFrame&);
FXImageFrame &operator=(const FXImageFrame&);
public:
long onPaint(FXObject*,FXSelector,void* ptr);
public:
/// Construct image frame and pass it an image
FXImageFrame(FXComposite* p,FXImage *img,FXuint opts=FRAME_SUNKEN|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0);
/// Create window
virtual void create();
/// Get default width
virtual FXint getDefaultWidth();
/// Get default height
virtual FXint getDefaultHeight();
/// Change the image being displayed
void setImage(FXImage* img);
/// Return the current image
FXImage* getImage() const { return image; }
/// Save to stream
virtual void save(FXStream& store) const;
/// Load from stream
virtual void load(FXStream& store);
/// Destroy the widget, but do not destroy the image
virtual ~FXImageFrame();
};
}
#endif
--- NEW FILE: FXMenuBar.h ---
/********************************************************************************
* *
* M e n u B a r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 1998,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXMenuBar.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXMENUBAR_H
#define FXMENUBAR_H
#ifndef FXTOOLBAR_H
#include "FXToolBar.h"
#endif
namespace FX {
/// Menu bar
class FXAPI FXMenuBar : public FXToolBar {
FXDECLARE(FXMenuBar)
protected:
FXMenuBar(){}
private:
FXMenuBar(const FXMenuBar&);
FXMenuBar &operator=(const FXMenuBar&);
public:
long onFocusLeft(FXObject*,FXSelector,void*);
long onFocusRight(FXObject*,FXSelector,void*);
long onEnter(FXObject*,FXSelector,void*);
long onLeave(FXObject*,FXSelector,void*);
long onMotion(FXObject*,FXSelector,void*);
long onButtonPress(FXObject*,FXSelector,void*);
long onButtonRelease(FXObject*,FXSelector,void*);
long onCmdUnpost(FXObject*,FXSelector,void*);
public:
/**
* Construct a floatable menubar
* Normally, the menubar is docked under window p.
* When floated, the menubar can be docked under window q, which is
* typically an FXToolbarShell window.
*/
FXMenuBar(FXComposite* p,FXComposite* q,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
/**
* Construct a non-floatable menubar.
* The menubar can not be undocked.
*/
FXMenuBar(FXComposite* p,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
/// Returns true if specified coordinate (in parent's coordinate system) is in menubar
virtual FXbool contains(FXint parentx,FXint parenty) const;
};
}
#endif
--- NEW FILE: FXRuler.h ---
/********************************************************************************
* *
* R u l e r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXRuler.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXRULER_H
#define FXRULER_H
#ifndef FXFRAME_H
#include "FXFrame.h"
#endif
namespace FX {
/// Ruler options
enum {
RULER_NORMAL = 0, /// Default appearance (default)
RULER_HORIZONTAL = 0, /// Ruler is horizontal (default)
RULER_VERTICAL = 0x00008000, /// Ruler is vertical
RULER_TICKS_OFF = 0, /// Tick marks off (default)
RULER_TICKS_TOP = 0x00010000, /// Ticks on the top (if horizontal)
RULER_TICKS_BOTTOM = 0x00020000, /// Ticks on the bottom (if horizontal)
RULER_TICKS_LEFT = RULER_TICKS_TOP, /// Ticks on the left (if vertical)
RULER_TICKS_RIGHT = RULER_TICKS_BOTTOM, /// Ticks on the right (if vertical)
RULER_TICKS_CENTER = RULER_TICKS_TOP|RULER_TICKS_BOTTOM, /// Tickmarks centered
RULER_NUMBERS = 0x00040000, /// Show numbers
RULER_ARROW = 0x00080000, /// Draw small arrow for cursor position
RULER_MARKERS = 0x00100000, /// Draw markers for indentation settings
RULER_METRIC = 0, /// Metric subdivision (default)
RULER_ENGLISH = 0x00200000 /// English subdivision
};
class FXFont;
/**
* The Ruler widget is placed alongside a document to measure position
* and size of entities within the document.
*/
class FXAPI FXRuler : public FXFrame {
FXDECLARE(FXRuler)
protected:
FXFont* font; // Font for numbers
FXColor textColor; // Color for numbers and ticks
FXint pos; // Arrow position
FXString tip;
FXString help;
protected:
FXRuler();
void drawLeftArrow(FXDCWindow& dc,FXint x,FXint y);
void drawRightArrow(FXDCWindow& dc,FXint x,FXint y);
void drawUpArrow(FXDCWindow& dc,FXint x,FXint y);
void drawDownArrow(FXDCWindow& dc,FXint x,FXint y);
private:
FXRuler(const FXRuler&);
FXRuler &operator=(const FXRuler&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onQueryHelp(FXObject*,FXSelector,void*);
long onQueryTip(FXObject*,FXSelector,void*);
long onCmdSetValue(FXObject*,FXSelector,void*);
long onCmdSetIntValue(FXObject*,FXSelector,void*);
long onCmdGetIntValue(FXObject*,FXSelector,void*);
public:
enum {
ID_ARROW=FXFrame::ID_LAST,
ID_LAST
};
public:
/// Construct label with given text and icon
FXRuler(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=RULER_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
/// Create server-side resources
virtual void create();
/// Detach server-side resources
virtual void detach();
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Set the text font
void setFont(FXFont *fnt);
/// Get the text font
FXFont* getFont() const { return font; }
/// Change slider value
void setValue(FXint value);
/// Return slider value
FXint getValue() const { return pos; }
/// Set ruler style
void setRulerStyle(FXuint style);
/// Get ruler style
FXuint getRulerStyle() const;
/// Get the current text color
FXColor getTextColor() const { return textColor; }
/// Set the current text color
void setTextColor(FXColor clr);
/// Set the status line help text for this label
void setHelpText(const FXString& text);
/// Get the status line help text for this label
FXString getHelpText() const { return help; }
/// Set the tool tip message for this label
void setTipText(const FXString& text);
/// Get the tool tip message for this label
FXString getTipText() const { return tip; }
/// Save label to a stream
virtual void save(FXStream& store) const;
/// Load label from a stream
virtual void load(FXStream& store);
/// Destructor
virtual ~FXRuler();
};
}
#endif
--- NEW FILE: FXScrollBar.h ---
/********************************************************************************
* *
* S c r o l l B a r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 1997,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXScrollBar.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXSCROLLBAR_H
#define FXSCROLLBAR_H
#ifndef FXWINDOW_H
#include "FXWindow.h"
#endif
namespace FX {
struct FXTimer;
/// ScrollBar styles
enum {
SCROLLBAR_HORIZONTAL = 0x00020000, /// Horizontally oriented
SCROLLBAR_VERTICAL = 0 /// Vertically oriented
};
/**
* The scroll bar is used when a document has a larger content than may be made
* visible. The range is the total size of the document, the page is the part
* of the document which is visible. The size of the scrollbar thumb is adjusted
* to give feedback of the relative sizes of each.
* The scroll bar may be manipulated by the left mouse (normal scrolling), right
* mouse (vernier or fine-scrolling), or middle mouse (same as the left mouse only
* the scroll position can hop to the place where the click is made).
* Finally, if the mouse sports a wheel, the scroll bar can be manipulated by means
* of the mouse wheel as well. Holding down the Control-key during wheel motion
* will cause the scrolling to go faster than normal.
* While moving the scroll bar, a message of type SEL_CHANGED will be sent to the
* target, and the message data will reflect the current position of type FXint.
* At the end of the interaction, the scroll bar will send a message of type
* SEL_COMMAND to notify the target of the final position.
*/
class FXAPI FXScrollBar : public FXWindow {
FXDECLARE(FXScrollBar)
protected:
FXint range; // Scrollable range
FXint page; // Page size
FXint line; // Line size
FXint pos; // Position
FXint thumbsize; // Thumb size
FXint thumbpos; // Thumb position
FXColor hiliteColor; // Hightlight color
FXColor shadowColor; // Shadow color
FXColor borderColor; // Border color
FXColor arrowColor; // Arrow color
FXTimer *timer; // Autoscroll timer
FXint dragpoint; // Point where grabbed
FXint dragjump; // Jump this much
FXuchar pressed; // Action being undertaken
protected:
FXScrollBar();
void drawButton(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXbool down);
void drawLeftArrow(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXbool down);
void drawRightArrow(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXbool down);
void drawUpArrow(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXbool down);
void drawDownArrow(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXbool down);
virtual void layout();
private:
FXScrollBar(const FXScrollBar&);
FXScrollBar &operator=(const FXScrollBar&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onMotion(FXObject*,FXSelector,void*);
long onMouseWheel(FXObject*,FXSelector,void*);
long onLeftBtnPress(FXObject*,FXSelector,void*);
long onLeftBtnRelease(FXObject*,FXSelector,void*);
long onMiddleBtnPress(FXObject*,FXSelector,void*);
long onMiddleBtnRelease(FXObject*,FXSelector,void*);
long onRightBtnPress(FXObject*,FXSelector,void*);
long onRightBtnRelease(FXObject*,FXSelector,void*);
long onUngrabbed(FXObject*,FXSelector,void*);
long onTimeIncPix(FXObject*,FXSelector,void*);
long onTimeIncLine(FXObject*,FXSelector,void*);
long onTimeIncPage(FXObject*,FXSelector,void*);
long onTimeDecPix(FXObject*,FXSelector,void*);
long onTimeDecLine(FXObject*,FXSelector,void*);
long onTimeDecPage(FXObject*,FXSelector,void*);
long onTimeWheel(FXObject*,FXSelector,void*);
long onCmdSetValue(FXObject*,FXSelector,void*);
long onCmdSetIntValue(FXObject*,FXSelector,void*);
long onCmdGetIntValue(FXObject*,FXSelector,void*);
long onCmdSetIntRange(FXObject*,FXSelector,void*);
long onCmdGetIntRange(FXObject*,FXSelector,void*);
public:
enum{
ID_TIMEWHEEL=FXWindow::ID_LAST,
ID_AUTOINC_LINE,
ID_AUTODEC_LINE,
ID_AUTOINC_PAGE,
ID_AUTODEC_PAGE,
ID_AUTOINC_PIX,
ID_AUTODEC_PIX,
ID_LAST
};
public:
/// Construct scroll bar
FXScrollBar(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=SCROLLBAR_VERTICAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Set content size range
void setRange(FXint r);
/// Return content size range
FXint getRange() const { return range; }
/// Set viewport page size
void setPage(FXint p);
/// Return page size
FXint getPage() const { return page; }
/// Set scoll increment for line
void setLine(FXint l);
/// Return line increment
FXint getLine() const { return line; }
/// Change current scroll position
void setPosition(FXint p);
/// return scroll position
FXint getPosition() const { return pos; }
/// Change highlight color
void setHiliteColor(FXColor clr);
/// Return highlight color
FXColor getHiliteColor() const { return hiliteColor; }
/// Change shadow color
void setShadowColor(FXColor clr);
/// Return shadow color
FXColor getShadowColor() const { return shadowColor; }
/// Return border color
void setBorderColor(FXColor clr);
/// Change border color
FXColor getBorderColor() const { return borderColor; }
/// Return arrow color
void setArrowColor(FXColor clr);
/// Return arrow color
FXColor getArrowColor() const { return arrowColor; }
/// Change the scrollbar style
FXuint getScrollbarStyle() const;
/// Get the current scrollbar style
void setScrollbarStyle(FXuint style);
/// Save to stream
virtual void save(FXStream& store) const;
/// Load from stream
virtual void load(FXStream& store);
/// Destructor
virtual ~FXScrollBar();
};
/// Corner between scroll bars
class FXAPI FXScrollCorner : public FXWindow {
FXDECLARE(FXScrollCorner)
protected:
FXScrollCorner();
private:
FXScrollCorner(const FXScrollCorner&);
FXScrollCorner &operator=(const FXScrollCorner&);
public:
long onPaint(FXObject*,FXSelector,void*);
public:
/// Constructor
FXScrollCorner(FXComposite* p);
/// Can not be enabled
virtual void enable();
/// Can not be disabled
virtual void disable();
};
}
#endif
--- NEW FILE: FXStatusBar.h ---
/********************************************************************************
* *
* S t a t u s B a r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 1997,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXStatusBar.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXSTATUSBAR_H
#define FXSTATUSBAR_H
#ifndef FXHORIZONTALFRAME_H
#include "FXHorizontalFrame.h"
#endif
namespace FX {
/// StatusBar options
enum {
STATUSBAR_WITH_DRAGCORNER = 0x00020000 /// Causes the DragCorner to be shown
};
class FXDragCorner;
class FXStatusLine;
/// Status bar
class FXAPI FXStatusBar : public FXHorizontalFrame {
FXDECLARE(FXStatusBar)
protected:
FXDragCorner *corner;
FXStatusLine *status;
protected:
FXStatusBar(){}
virtual void layout();
private:
FXStatusBar(const FXStatusBar&);
FXStatusBar& operator=(const FXStatusBar&);
public:
/// Construct status bar with or without a drag corner
FXStatusBar(FXComposite* p,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=4,FXint vs=0);
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Show or hide the drag corner
void setCornerStyle(FXbool withcorner=TRUE);
/// Return TRUE if drag corner shown
FXbool getCornerStyle() const;
/// Acess the status line widget
FXStatusLine *getStatusLine() const { return status; }
/// Access the drag corner widget
FXDragCorner *getDragCorner() const { return corner; }
/// Save status bar to a stream
virtual void save(FXStream& store) const;
/// Load status bar from a stream
virtual void load(FXStream& store);
/// Destructor
virtual ~FXStatusBar();
};
}
#endif
--- NEW FILE: FXStatusLine.h ---
/********************************************************************************
* *
* S t a t u s L i n e W i d g e t *
* *
*********************************************************************************
* Copyright (C) 1999,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXStatusLine.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXSTATUSLINE_H
#define FXSTATUSLINE_H
#ifndef FXFRAME_H
#include "FXFrame.h"
#endif
namespace FX {
/**
* The status line normally shows its permanent message; when
* moving the mouse over a Widget which has status-line help, the status line
* temporarily replaces its normal message with the help information; the status
* line obtains the help message by sending the Widget a ID_QUERY_HELP message
* with type SEL_UPDATE.
* If this query does not result in a new status string, the target of
* the status line is tried via an ordinary SEL_UPDATE message.
* If none of the above work then the status line will display the normal text,
* i.e. the string set via setNormalText().
* If the message contains a newline (\n), then the part before the newline
* will be displayed in the highlight color, while the part after the newline
* is shown using the normal text color.
*/
class FXAPI FXStatusLine : public FXFrame {
FXDECLARE(FXStatusLine)
protected:
FXString status; // Current status message
FXString normal; // Normally displayed message
FXFont *font; // Font
FXColor textColor; // Status text color
FXColor textHighlightColor; // Status text highlight color
protected:
FXStatusLine();
static const FXchar defaultMessage[];
private:
FXStatusLine(const FXStatusLine&);
FXStatusLine& operator=(const FXStatusLine&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onUpdate(FXObject*,FXSelector,void*);
long onCmdGetStringValue(FXObject*,FXSelector,void*);
long onCmdSetStringValue(FXObject*,FXSelector,void*);
public:
/// Constructor
FXStatusLine(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0);
/// Create server-side resources
virtual void create();
/// Detach server-side resources
virtual void detach();
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Change the temporary status message
void setText(const FXString& text);
/// Return the temporary status message
FXString getText() const { return status; }
/// Change the permanent status message
void setNormalText(const FXString& text);
/// Return the permanent status message
FXString getNormalText() const { return normal; }
/// Change the font
void setFont(FXFont* fnt);
/// Return the current font
FXFont* getFont() const { return font; }
/// Return the text color
FXColor getTextColor() const { return textColor; }
/// Change the text color
void setTextColor(FXColor clr);
/// Return the highlight text color
FXColor getTextHighlightColor() const { return textHighlightColor; }
/// Change the highlight text color
void setTextHighlightColor(FXColor clr);
/// Save status line to stream
virtual void save(FXStream& store) const;
/// Load status line from stream
virtual void load(FXStream& store);
/// Destroy
virtual ~FXStatusLine();
};
}
#endif
--- NEW FILE: FXToolBar.h ---
/********************************************************************************
* *
* T o o l B a r W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2000,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXToolBar.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXTOOLBAR_H
#define FXTOOLBAR_H
#ifndef FXPACKER_H
#include "FXPacker.h"
#endif
namespace FX {
/**
* ToolBar control.
*/
class FXAPI FXToolBar : public FXPacker {
FXDECLARE(FXToolBar)
protected:
FXComposite *drydock; // Parent when docked
FXComposite *wetdock; // Parent when floating
FXRectangle outline; // Outline shown while dragging
FXWindow *dockafter; // Dock after this window
FXuint dockside; // Dock on this side
FXbool docking; // Dock it
protected:
FXToolBar();
virtual void layout();
private:
FXToolBar(const FXToolBar&);
FXToolBar &operator=(const FXToolBar&);
public:
long onCmdUndock(FXObject*,FXSelector,void*);
long onUpdUndock(FXObject*,FXSelector,void*);
long onCmdDockTop(FXObject*,FXSelector,void*);
long onUpdDockTop(FXObject*,FXSelector,void*);
long onCmdDockBottom(FXObject*,FXSelector,void*);
long onUpdDockBottom(FXObject*,FXSelector,void*);
long onCmdDockLeft(FXObject*,FXSelector,void*);
long onUpdDockLeft(FXObject*,FXSelector,void*);
long onCmdDockRight(FXObject*,FXSelector,void*);
long onUpdDockRight(FXObject*,FXSelector,void*);
long onBeginDragGrip(FXObject*,FXSelector,void*);
long onEndDragGrip(FXObject*,FXSelector,void*);
long onDraggedGrip(FXObject*,FXSelector,void*);
public:
enum {
ID_UNDOCK=FXPacker::ID_LAST, /// Undock the toolbar
ID_DOCK_TOP, /// Dock on the top
ID_DOCK_BOTTOM, /// Dock on the bottom
ID_DOCK_LEFT, /// Dock on the left
ID_DOCK_RIGHT, /// Dock on the right
ID_TOOLBARGRIP, /// Notifications from toolbar grip
ID_LAST
};
public:
/**
* Construct a floatable toolbar
* Normally, the toolbar is docked under window p.
* When floated, the toolbar can be docked under window q, which is
* typically an FXToolBarShell window.
*/
FXToolBar(FXComposite* p,FXComposite* q,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
/**
* Construct a non-floatable toolbar.
* The toolbar can not be undocked.
*/
FXToolBar(FXComposite* p,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=2,FXint pr=3,FXint pt=3,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
/**
* Set parent when docked.
* If it was docked, reparent under the new docking window.
*/
void setDryDock(FXComposite* dry);
/**
* Set parent when floating.
* If it was undocked, then reparent under the new floating window.
*/
void setWetDock(FXComposite* wet);
/// Return parent when docked
FXComposite* getDryDock() const { return drydock; }
/// Return parent when floating
FXComposite* getWetDock() const { return wetdock; }
/// Return true if toolbar is docked
FXbool isDocked() const;
/**
* Dock the bar against the given side, after some other widget.
* However, if after is -1, it will be docked as the innermost bar just before
* the work-area, while if after is 0, if will be docked as the outermost bar.
*/
virtual void dock(FXuint side=LAYOUT_SIDE_TOP,FXWindow* after=(FXWindow*)-1);
/**
* Undock or float the bar.
* The initial position of the wet dock is a few pixels
* below and to the right of the original docked position.
*/
virtual void undock();
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Return width for given height
virtual FXint getWidthForHeight(FXint h);
/// Return height for given width
virtual FXint getHeightForWidth(FXint w);
/// Set docking side
void setDockingSide(FXuint side=LAYOUT_SIDE_TOP);
/// Return docking side
FXuint getDockingSide() const;
/// Save toolbar to a stream
virtual void save(FXStream& store) const;
/// Load toolbar from a stream
virtual void load(FXStream& store);
/// Destroy
virtual ~FXToolBar();
};
}
#endif
--- NEW FILE: FXToolBarGrip.h ---
/********************************************************************************
* *
* T o o l B a r G r i p W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2000,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXToolBarGrip.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXTOOLBARGRIP_H
#define FXTOOLBARGRIP_H
#ifndef FXWINDOW_H
#include "FXWindow.h"
#endif
namespace FX {
/// Tool Bar Grip styles
enum {
TOOLBARGRIP_SINGLE = 0, /// Single bar mode for movable toolbars
TOOLBARGRIP_DOUBLE = 0x00008000, /// Double bar mode for dockable toolbars
TOOLBARGRIP_SEPARATOR = 0x00010000 /// Separator mode
};
class FXToolBar;
/**
* A toolbar grip is used to move its parent [an FXToolBar].
* The grip draws either a single or double bar; it is customary
* to use the single bar grip for toolbar-rearrangements only,
* and use the double-bar when the toolbar needs to be floated
* or docked.
* The toolbar grip is automatically oriented properly by the
* the toolbar widget.
*/
class FXAPI FXToolBarGrip : public FXWindow {
FXDECLARE(FXToolBarGrip)
protected:
FXColor activeColor; // Color when active
FXColor hiliteColor; // Highlight color
FXColor shadowColor; // Shadow color
protected:
FXToolBarGrip();
private:
FXToolBarGrip(const FXToolBarGrip&);
FXToolBarGrip& operator=(const FXToolBarGrip&);
public:
long onPaint(FXObject*,FXSelector,void*);
long onLeftBtnPress(FXObject*,FXSelector,void*);
long onLeftBtnRelease(FXObject*,FXSelector,void*);
long onMotion(FXObject*,FXSelector,void*);
long onEnter(FXObject*,FXSelector,void*);
long onLeave(FXObject*,FXSelector,void*);
public:
/// Construct toolbar grip
FXToolBarGrip(FXToolBar* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TOOLBARGRIP_SINGLE,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
/// Return default width
virtual FXint getDefaultWidth();
/// Return default height
virtual FXint getDefaultHeight();
/// Change toolbar grip to double
void setDoubleBar(FXbool dbl=TRUE);
/// Return toolbar grip to double
FXuint getDoubleBar() const;
/// Change highlight color
void setHiliteColor(FXColor clr);
/// Get highlight color
FXColor getHiliteColor() const { return hiliteColor; }
/// Change shadow color
void setShadowColor(FXColor clr);
/// Get shadow color
FXColor getShadowColor() const { return shadowColor; }
/// Set the active color
void setActiveColor(FXColor clr);
/// Get the active color
FXColor getActiveColor() const { return activeColor; }
/// Save to stream
virtual void save(FXStream& store) const;
/// Load from stream
virtual void load(FXStream& store);
};
}
#endif
--- NEW FILE: FXToolBarShell.h ---
/********************************************************************************
* *
* T o o l B a r S h e l l W i d g e t *
* *
*********************************************************************************
* Copyright (C) 2000,2002 by Jeroen van der Zijp. All Rights Reserved. *
*********************************************************************************
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*********************************************************************************
* $Id: FXToolBarShell.h,v 1.1 2002/07/11 16:46:53 lyle Exp $ *
********************************************************************************/
#ifndef FXTOOLBARSHELL_H
#define FXTOOLBARSHELL_H
#ifndef FXTOPWINDOW_H
#include "FXTopWindow.h"
#endif
namespace FX {
/**
* A Tool bar shell is a widget floating around over the Main Window.
* It typically contains an undocked tool bar.
*/
class FXAPI FXToolBarShell : public FXTopWindow {
FXDECLARE(FXToolBarShell)
protected:
FXColor baseColor;
FXColor hiliteColor;
FXColor shadowColor;
FXColor borderColor;
FXint border;
protected:
FXToolBarShell(){}
virtual void layout();
void drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawRidgeRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawGrooveRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawDoubleRaisedRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawDoubleSunkenRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
void drawFrame(FXDCWindow& dc,FXint x,FX...
[truncated message content] |