It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Copyright (c) 2001-2002, OpenBeOS
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// File Name: TextInput.h
|
||||
// Author: Frans van Nispen ([email protected])
|
||||
// Description: The BTextView derivative owned by an instance of
|
||||
// BTextControl.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifndef _TEXT_CONTROLI_H
|
||||
#define _TEXT_CONTROLI_H
|
||||
|
||||
// Standard Includes -----------------------------------------------------------
|
||||
|
||||
// System Includes -------------------------------------------------------------
|
||||
#include <TextView.h>
|
||||
|
||||
// Project Includes ------------------------------------------------------------
|
||||
|
||||
// Local Includes --------------------------------------------------------------
|
||||
|
||||
// Local Defines ---------------------------------------------------------------
|
||||
|
||||
// Globals ---------------------------------------------------------------------
|
||||
|
||||
class BTextControl;
|
||||
|
||||
// _BTextInput_ class ----------------------------------------------------------
|
||||
class _BTextInput_ : public BTextView {
|
||||
public:
|
||||
_BTextInput_(BTextControl* parent, BRect frame,
|
||||
const char* name, BRect rect,
|
||||
uint32 mask = B_FOLLOW_LEFT | B_FOLLOW_TOP,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||
~_BTextInput_();
|
||||
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MakeFocus(bool state = true);
|
||||
virtual void SetViewColor(rgb_color);
|
||||
rgb_color ViewColor();
|
||||
virtual bool CanEndLine(int32);
|
||||
virtual void KeyDown(const char* bytes, int32 numBytes);
|
||||
virtual void Draw(BRect);
|
||||
virtual void SetEnabled(bool state);
|
||||
virtual void MouseDown(BPoint where);
|
||||
|
||||
private:
|
||||
rgb_color fViewColor;
|
||||
bool fEnabled;
|
||||
bool fChanged;
|
||||
BTextControl* fParent;
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#endif // _TEXT_CONTROLI_H
|
||||
|
||||
/*
|
||||
* $Log $
|
||||
*
|
||||
* $Id $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/*****************************************************************************/
|
||||
// print_server Background Application.
|
||||
//
|
||||
// Version: 1.0.0d1
|
||||
//
|
||||
// The print_server manages the communication between applications and the
|
||||
// printer and transport drivers.
|
||||
//
|
||||
//
|
||||
// This application and all source files used in its construction, except
|
||||
// where noted, are licensed under the MIT License, and have been written
|
||||
// and are:
|
||||
//
|
||||
// Copyright (c) 2001 OpenBeOS Project
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef _PR_SERVER_H_
|
||||
#define _PR_SERVER_H_
|
||||
|
||||
// signature mime types
|
||||
#define PSRV_SIGNATURE_TYPE "application/x-vnd.Be-PSRV"
|
||||
#define PRNT_SIGNATURE_TYPE "application/x-vnd.Be-PRNT"
|
||||
|
||||
// messages understood by print_server
|
||||
#define PSRV_GET_ACTIVE_PRINTER 'pgcp'
|
||||
#define PSRV_MAKE_PRINTER_ACTIVE_QUIETLY 'pmaq'
|
||||
#define PSRV_MAKE_PRINTER_ACTIVE 'pmac'
|
||||
#define PSRV_MAKE_PRINTER 'selp'
|
||||
#define PSRV_SHOW_PAGE_SETUP 'pgst'
|
||||
#define PSRV_SHOW_PRINT_SETUP 'ppst'
|
||||
#define PSRV_PRINT_SPOOLED_JOB 'psns'
|
||||
|
||||
// mime file types
|
||||
#define PSRV_PRINTER_FILETYPE "application/x-vnd.Be.printer"
|
||||
#define PSRV_SPOOL_FILETYPE "application/x-vnd.Be.printer-spool"
|
||||
|
||||
// spool Attributes
|
||||
#define PSRV_SPOOL_ATTR_MIMETYPE "_spool/MimeType"
|
||||
#define PSRV_SPOOL_ATTR_PAGECOUNT "_spool/Page Count"
|
||||
#define PSRV_SPOOL_ATTR_DESCRIPTION "_spool/Description"
|
||||
#define PSRV_SPOOL_ATTR_PRINTER "_spool/Printer"
|
||||
#define PSRV_SPOOL_ATTR_STATUS "_spool/Status"
|
||||
#define PSRV_SPOOL_ATTR_ERRCODE "_spool/_errorcode"
|
||||
|
||||
// printer attributes
|
||||
#define PSRV_PRINTER_ATTR_DRV_NAME "Driver Name"
|
||||
#define PSRV_PRINTER_ATTR_PRT_NAME "Printer Name"
|
||||
#define PSRV_PRINTER_ATTR_COMMENTS "Comments"
|
||||
#define PSRV_PRINTER_ATTR_STATE "state"
|
||||
#define PSRV_PRINTER_ATTR_TRANSPORT "transport"
|
||||
#define PSRV_PRINTER_ATTR_TRANSPORT_ADDR "transport_address"
|
||||
#define PSRV_PRINTER_ATTR_CNX "connection"
|
||||
#define PSRV_PRINTER_ATTR_PNP "_PNP"
|
||||
#define PSRV_PRINTER_ATTR_MDL "_MDL"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user