* Added and implemented B_INVALIDATE as available on Dano; to invalidate only a certain
part of the view, you can add a BRect "be:area" to that message - very handy. * Cleaned up AppDefs.h a bit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20683 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ea4f253fd6
commit
ffcc37a0aa
@ -1,29 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2002, Haiku Inc. All Rights Reserved.
|
* Copyright 2001-2007, Haiku Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Erik Jaesler (erik@cgsoftware.com)
|
* Erik Jaesler (erik@cgsoftware.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _APP_DEFS_H
|
#ifndef _APP_DEFS_H
|
||||||
#define _APP_DEFS_H
|
#define _APP_DEFS_H
|
||||||
|
|
||||||
// Standard Includes -----------------------------------------------------------
|
|
||||||
|
|
||||||
// System Includes -------------------------------------------------------------
|
|
||||||
#include <BeBuild.h>
|
#include <BeBuild.h>
|
||||||
|
|
||||||
// Project Includes ------------------------------------------------------------
|
|
||||||
|
|
||||||
// Local Includes --------------------------------------------------------------
|
|
||||||
|
|
||||||
// Local Defines ---------------------------------------------------------------
|
|
||||||
|
|
||||||
// Globals ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
// Global Cursors --------------------------------------------------------------
|
|
||||||
|
|
||||||
// Old-style cursors
|
// Old-style cursors
|
||||||
extern const unsigned char B_HAND_CURSOR[];
|
extern const unsigned char B_HAND_CURSOR[];
|
||||||
@ -36,8 +23,8 @@ extern const BCursor *B_CURSOR_SYSTEM_DEFAULT;
|
|||||||
extern const BCursor *B_CURSOR_I_BEAM;
|
extern const BCursor *B_CURSOR_I_BEAM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// System Message Codes --------------------------------------------------------
|
|
||||||
|
|
||||||
|
// System Message Codes
|
||||||
enum {
|
enum {
|
||||||
B_ABOUT_REQUESTED = '_ABR',
|
B_ABOUT_REQUESTED = '_ABR',
|
||||||
B_WINDOW_ACTIVATED = '_ACT',
|
B_WINDOW_ACTIVATED = '_ACT',
|
||||||
@ -46,6 +33,7 @@ enum {
|
|||||||
B_QUIT_REQUESTED = '_QRQ',
|
B_QUIT_REQUESTED = '_QRQ',
|
||||||
B_CLOSE_REQUESTED = '_QRQ', // Obsolete; use B_QUIT_REQUESTED
|
B_CLOSE_REQUESTED = '_QRQ', // Obsolete; use B_QUIT_REQUESTED
|
||||||
B_CANCEL = '_CNC',
|
B_CANCEL = '_CNC',
|
||||||
|
B_INVALIDATE = '_IVL',
|
||||||
B_KEY_DOWN = '_KYD',
|
B_KEY_DOWN = '_KYD',
|
||||||
B_KEY_UP = '_KYU',
|
B_KEY_UP = '_KYU',
|
||||||
B_UNMAPPED_KEY_DOWN = '_UKD',
|
B_UNMAPPED_KEY_DOWN = '_UKD',
|
||||||
@ -76,8 +64,10 @@ enum {
|
|||||||
B_WORKSPACES_CHANGED = '_WCG',
|
B_WORKSPACES_CHANGED = '_WCG',
|
||||||
B_WORKSPACE_ACTIVATED = '_WAC',
|
B_WORKSPACE_ACTIVATED = '_WAC',
|
||||||
B_ZOOM = '_WZM',
|
B_ZOOM = '_WZM',
|
||||||
_COLORS_UPDATED = '_CLU', // Currently internal-use only. Later, public as B_COLORS_UPDATED
|
_COLORS_UPDATED = '_CLU',
|
||||||
_FONTS_UPDATED = '_FNU', // Currently internal-use only. Later, public as B_FONTS_UPDATED
|
// Currently internal-use only. Later, public as B_COLORS_UPDATED
|
||||||
|
_FONTS_UPDATED = '_FNU',
|
||||||
|
// Currently internal-use only. Later, public as B_FONTS_UPDATED
|
||||||
_APP_MENU_ = '_AMN',
|
_APP_MENU_ = '_AMN',
|
||||||
_BROWSER_MENUS_ = '_BRM',
|
_BROWSER_MENUS_ = '_BRM',
|
||||||
_MENU_EVENT_ = '_MEV',
|
_MENU_EVENT_ = '_MEV',
|
||||||
@ -99,8 +89,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Other Commands --------------------------------------------------------------
|
// Other Commands
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
B_SET_PROPERTY = 'PSET',
|
B_SET_PROPERTY = 'PSET',
|
||||||
B_GET_PROPERTY = 'PGET',
|
B_GET_PROPERTY = 'PGET',
|
||||||
@ -142,7 +131,5 @@ enum {
|
|||||||
|
|
||||||
// Media Kit reserves all reserved codes starting in 'TRI'
|
// Media Kit reserves all reserved codes starting in 'TRI'
|
||||||
};
|
};
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#endif // _APP_DEFS_H
|
#endif // _APP_DEFS_H
|
||||||
|
|
||||||
|
@ -962,6 +962,19 @@ FrameMoved(origin);
|
|||||||
target->MessageReceived(msg);
|
target->MessageReceived(msg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case B_INVALIDATE:
|
||||||
|
{
|
||||||
|
if (BView* view = dynamic_cast<BView*>(target)) {
|
||||||
|
BRect rect;
|
||||||
|
if (msg->FindRect("be:area", &rect) == B_OK)
|
||||||
|
view->Invalidate(rect);
|
||||||
|
else
|
||||||
|
view->Invalidate();
|
||||||
|
} else
|
||||||
|
target->MessageReceived(msg);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case B_KEY_DOWN:
|
case B_KEY_DOWN:
|
||||||
{
|
{
|
||||||
if (!_HandleKeyDown(msg)) {
|
if (!_HandleKeyDown(msg)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user