home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Source / OIndicator.cpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  3KB  |  104 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OIndicator.cpp
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30.  
  31. // $Header: W:/Projects/OCL/Source/rcs/OIndicator.cpp 1.50 1996/08/11 23:49:21 B.STEIN Release $
  32.  
  33. #define __OCL_SOURCE__
  34.  
  35. #define OINCL_OSTRING
  36. #define OINCL_BASE
  37.  
  38. #include <ocl.hpp>
  39. #include <OIndicator.hpp>
  40.  
  41.  
  42. OIndicator::OIndicator(const ULONG id,
  43.                        const HWND  Parent,
  44.                        const ULONG Style)
  45.   : OSlider(id, Parent, 101, 0, 101, 0, Style)
  46.   {}
  47.  
  48.  
  49. OIndicator::OIndicator(const ULONG id,
  50.                        const OFrame& Parent,
  51.                        const ULONG Style)
  52.   : OSlider(id, Parent, 101, 0, 101, 0, Style) 
  53.   {}
  54.  
  55.  
  56. OIndicator::OIndicator(const ULONG id,
  57.                        const pOFrame Parent,
  58.                        const ULONG Style)
  59.   : OSlider(id, Parent, 101, 0, 101, 0, Style) 
  60.   {}
  61.  
  62.  
  63. OIndicator::~OIndicator()
  64.   {}
  65.  
  66.  
  67. PSZ OIndicator::isOfType() const
  68.  return("OIndicator"); 
  69. }
  70.  
  71.  
  72.  
  73. OIndicator& OIndicator::createIndicator(const SHORT x, const SHORT y,
  74.                                         const SHORT cx, const SHORT cy)
  75. {
  76.  createSlider(x, y, cx, cy);
  77.  
  78.  setFont("8.Helv");
  79.  
  80.  setTickSize        (2).
  81.  setTickSize        (5,   0).
  82.  setTickSize        (5,  25).
  83.  setTickSize        (5,  50).
  84.  setTickSize        (5,  75).
  85.  setTickSize        (5, 100).
  86.  setSliderScaleText ("0",     0).
  87.  setSliderScaleText ("25",   25).
  88.  setSliderScaleText ("50",   50).
  89.  setSliderScaleText ("75",   75).
  90.  setSliderScaleText ("100", 100);
  91.  
  92.  return(*this);
  93. }
  94.  
  95.  
  96. OWindow& OIndicator::inherit(const HWND Parent)
  97. {
  98.  OWindow::inherit(Parent);
  99.  return(createIndicator(0, 0, 0, 0));
  100. }
  101.  
  102. // end of source
  103.